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.Succeeded
Nested classes/interfaces inherited from interface org.eclipse.jetty.security.AuthenticationState.Deferred
AuthenticationState.Deferred.DeferredResponse
-
Field Summary
Fields inherited from interface org.eclipse.jetty.security.AuthenticationState
CHALLENGE, SEND_FAILURE, SEND_SUCCESS
-
Constructor Summary
-
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 credentialsvoid
Logout the authenticated user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.server.Request.AuthenticationState
getUserPrincipal
-
Field Details
-
_authenticator
-
-
Constructor Details
-
DeferredAuthenticationState
-
-
Method Details
-
authenticate
Description copied from interface:AuthenticationState.Deferred
Authenticate 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.Association
is made available viaAuthenticationState.Deferred.getAssociation()
.- Specified by:
authenticate
in interfaceAuthenticationState.Deferred
- Parameters:
request
- The request to authenticate- Returns:
- A
AuthenticationState.Succeeded
authentication or null - See Also:
-
authenticate
Description copied from interface:AuthenticationState.Deferred
Authenticate 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.Association
is made available viaAuthenticationState.Deferred.getAssociation()
.- Specified by:
authenticate
in 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.Deferred
Authenticate the request with the passed credentials- Specified by:
login
in 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.Succeeded
authentication or null
-
logout
Description copied from interface:AuthenticationState.Deferred
Logout the authenticated user.- Specified by:
logout
in interfaceAuthenticationState.Deferred
- Parameters:
request
- The authenticated requestresponse
- The associated response, which may be updated to clear a session ID.
-
getAssociation
- Specified by:
getAssociation
in interfaceAuthenticationState.Deferred
- Returns:
- Any
IdentityService.Association
created during deferred authentication. - See Also:
-