Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.server
Interface UserIdentity

All Known Subinterfaces:
  UserIdentity.UnauthenticatedUserIdentity

All Known Implementing Classes:
  DefaultUserIdentity

    public interface UserIdentity

User object that encapsulates user identity and operations such as run-as-role actions, checking isUserInRole and getUserPrincipal. Implementations of UserIdentity should be immutable so that they may be cached by Authenticators and LoginServices.

Nested Class Summary
`static interface` | `UserIdentity.Scope` A UserIdentity Scope.
`static interface` | `UserIdentity.UnauthenticatedUserIdentity`

Field Summary
`static UserIdentity` | `UNAUTHENTICATED_IDENTITY`

Method Summary
`javax.security.auth.Subject` | `getSubject()`
`java.security.Principal` | `getUserPrincipal()`
`boolean` | `isUserInRole(java.lang.String role, UserIdentity.Scope scope)` Check if the user is in a role.

Field Detail

### UNAUTHENTICATED_IDENTITY

    static final UserIdentity UNAUTHENTICATED_IDENTITY

Method Detail

### getSubject

    javax.security.auth.Subject getSubject()

  Returns:
    The user subject

### getUserPrincipal

    java.security.Principal getUserPrincipal()

  Returns:
    The user principal

### isUserInRole

    boolean isUserInRole(java.lang.String role,
                         UserIdentity.Scope scope)

  Check if the user is in a role. This call is used to satisfy authorization calls from container code which will be using translated role names.

  Parameters:
    `role` - A role name.
    `scope` -
  Returns:
    True if the user can act in that role.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.