Class LoginAuthenticator.UserAuthenticationSucceeded
java.lang.Object
org.eclipse.jetty.security.authentication.LoginAuthenticator.UserAuthenticationSucceeded
- All Implemented Interfaces:
Serializable
,AuthenticationState
,AuthenticationState.Succeeded
,Request.AuthenticationState
- Direct Known Subclasses:
LoginAuthenticator.UserAuthenticationSent
,SessionAuthentication
- Enclosing class:
- LoginAuthenticator
public static class LoginAuthenticator.UserAuthenticationSucceeded
extends Object
implements AuthenticationState.Succeeded, Serializable
Base class for representing a successful authentication state.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.security.AuthenticationState
AuthenticationState.Deferred, AuthenticationState.ResponseSent, AuthenticationState.ServeAs, AuthenticationState.Succeeded
-
Field Summary
Fields inherited from interface org.eclipse.jetty.security.AuthenticationState
CHALLENGE, SEND_FAILURE, SEND_SUCCESS
-
Constructor Summary
ConstructorDescriptionUserAuthenticationSucceeded
(String authenticationType, UserIdentity userIdentity) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isUserInRole
(String role) void
Remove any user information that may be present in the request such that a call to getUserPrincipal/getRemoteUser will return null.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.security.AuthenticationState.Succeeded
getUserPrincipal
-
Field Details
-
_authenticationType
-
_userIdentity
-
-
Constructor Details
-
UserAuthenticationSucceeded
-
-
Method Details
-
getAuthenticationType
- Specified by:
getAuthenticationType
in interfaceAuthenticationState.Succeeded
- Returns:
- The method used to authenticate the user.
-
getUserIdentity
- Specified by:
getUserIdentity
in interfaceAuthenticationState.Succeeded
- Returns:
- The
UserIdentity
of the authenticated user.
-
isUserInRole
- Specified by:
isUserInRole
in interfaceAuthenticationState.Succeeded
- Parameters:
role
- The role to check.- Returns:
- True if the user is in the passed role
-
logout
Description copied from interface:AuthenticationState.Succeeded
Remove any user information that may be present in the request such that a call to getUserPrincipal/getRemoteUser will return null.- Specified by:
logout
in interfaceAuthenticationState.Succeeded
- Parameters:
request
- the requestresponse
- the response
-
toString
-