org.eclipse.jetty.server
接口 UserIdentity

所有已知子接口:
UserIdentity.UnauthenticatedUserIdentity
所有已知实现类:
DefaultUserIdentity, SpnegoUserIdentity

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.


嵌套类摘要
static interface UserIdentity.Scope
          A UserIdentity Scope.
static interface UserIdentity.UnauthenticatedUserIdentity
           
 
字段摘要
static UserIdentity UNAUTHENTICATED_IDENTITY
           
 
方法摘要
 Subject getSubject()
           
 Principal getUserPrincipal()
           
 boolean isUserInRole(String role, UserIdentity.Scope scope)
          Check if the user is in a role.
 

字段详细信息

UNAUTHENTICATED_IDENTITY

static final UserIdentity UNAUTHENTICATED_IDENTITY
方法详细信息

getSubject

Subject getSubject()
返回:
The user subject

getUserPrincipal

Principal getUserPrincipal()
返回:
The user principal

isUserInRole

boolean isUserInRole(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.

参数:
role - A role name.
scope -
返回:
True if the user can act in that role.


Copyright © 2013. All Rights Reserved.