Package org.eclipse.jetty.security
Interface AuthenticationState.Deferred
- All Superinterfaces:
AuthenticationState
,Request.AuthenticationState
- All Known Implementing Classes:
DeferredAuthenticationState
,LoginAuthenticator.LoggedOutAuthentication
- Enclosing interface:
- AuthenticationState
Authentication is Deferred, either so that credentials can later be passed
with
login(String, String, Request, Response)
; or that existing
credentials on the request may be validated with authenticate(Request)
;
or an authentication dialog can be advanced with authenticate(Request, Response, Callback)
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A tag interface used to identify aResponse
that might be passed toAuthenticator.validateRequest(Request, Response, Callback)
while doing deferred authentication when a challenge cannot be sent.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
-
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.static boolean
isDeferred
(Response response) Authenticate the request with the passed credentialsvoid
Logout the authenticated user.Methods inherited from interface org.eclipse.jetty.server.Request.AuthenticationState
getUserPrincipal
-
Method Details
-
isDeferred
- Parameters:
response
- the response- Returns:
- true if this response is from a deferred call to
authenticate(Request)
-
authenticate
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 viagetAssociation()
.- Parameters:
request
- The request to authenticate- Returns:
- A
AuthenticationState.Succeeded
authentication or null - See Also:
-
authenticate
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 viagetAssociation()
.- 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
AuthenticationState.Succeeded login(String username, Object password, Request request, Response response) Authenticate the request with the passed credentials- 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
Logout the authenticated user.- Parameters:
request
- The authenticated requestresponse
- The associated response, which may be updated to clear a session ID.
-
getAssociation
IdentityService.Association getAssociation()- Returns:
- Any
IdentityService.Association
created during deferred authentication. - See Also:
-