Class DeferredAuthenticationState
java.lang.Object
org.eclipse.jetty.security.internal.DeferredAuthenticationState
- All Implemented Interfaces:
AuthenticationState,AuthenticationState.Deferred,Request.AuthenticationState
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.security.AuthenticationState
AuthenticationState.Deferred, AuthenticationState.ResponseSent, AuthenticationState.ServeAs, AuthenticationState.SucceededNested classes/interfaces inherited from interface org.eclipse.jetty.security.AuthenticationState.Deferred
AuthenticationState.Deferred.DeferredResponse -
Field Summary
FieldsFields inherited from interface org.eclipse.jetty.security.AuthenticationState
CHALLENGE, SEND_FAILURE, SEND_SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Request request) Authenticate the request using any credentials already associated with the request.authenticate(Request request, Response response, Callback callback) Authenticate the request using any credentials already associated with the request or challenging if necessary.Authenticate the request with the passed credentialsvoidLogout the authenticated user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jetty.server.Request.AuthenticationState
getUserPrincipal
-
Field Details
-
_authenticator
-
-
Constructor Details
-
DeferredAuthenticationState
-
-
Method Details
-
authenticate
Description copied from interface:AuthenticationState.DeferredAuthenticate the request using any credentials already associated with the request. No challenge can be sent. If the login is successful, then theIdentityService.associate(UserIdentity, RunAsToken)method is used and the returnedIdentityService.Associationis made available viaAuthenticationState.Deferred.getAssociation().- Specified by:
authenticatein interfaceAuthenticationState.Deferred- Parameters:
request- The request to authenticate- Returns:
- A
AuthenticationState.Succeededauthentication or null - See Also:
-
authenticate
Description copied from interface:AuthenticationState.DeferredAuthenticate the request using any credentials already associated with the request or challenging if necessary. If the login is successful, then theIdentityService.associate(UserIdentity, RunAsToken)method is used and the returnedIdentityService.Associationis made available viaAuthenticationState.Deferred.getAssociation().- Specified by:
authenticatein interfaceAuthenticationState.Deferred- Parameters:
request- The request to authenticateresponse- The response to use for a challenge.callback- The callback to complete if a challenge is sent- Returns:
- The next
AuthenticationState, if it isAuthenticationState.ResponseSent, then the callback will be completed. - See Also:
-
login
public AuthenticationState.Succeeded login(String username, Object password, Request request, Response response) Description copied from interface:AuthenticationState.DeferredAuthenticate the request with the passed credentials- Specified by:
loginin interfaceAuthenticationState.Deferred- Parameters:
username- The username to validatepassword- The credential to validaterequest- The request to authenticateresponse- The response, which may be updated if the session ID is changed.- Returns:
- A
AuthenticationState.Succeededauthentication or null
-
logout
Description copied from interface:AuthenticationState.DeferredLogout the authenticated user.- Specified by:
logoutin interfaceAuthenticationState.Deferred- Parameters:
request- The authenticated requestresponse- The associated response, which may be updated to clear a session ID.
-
getAssociation
- Specified by:
getAssociationin interfaceAuthenticationState.Deferred- Returns:
- Any
IdentityService.Associationcreated during deferred authentication. - See Also:
-