Top Fields Constructors Methods
org.eclipse.jetty.security.internal

public Class DeferredAuthenticationState

extends Object
implements Deferred
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.security.AuthenticationState.Deferred, org.eclipse.jetty.security.AuthenticationState, org.eclipse.jetty.server.Request.AuthenticationState
Imports
java.nio.ByteBuffer, java.util.concurrent.CompletableFuture, java.util.function.Supplier, org.eclipse.jetty.http.HttpFields, .HttpFields.Mutable, org.eclipse.jetty.security.AuthenticationState, .IdentityService, .LoginService, .ServerAuthException, .UserIdentity, org.eclipse.jetty.security.authentication.LoginAuthenticator, org.eclipse.jetty.server.Request, .Response, org.eclipse.jetty.util.Callback, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
pack-priv static final Response
private IdentityService.Association
protected final LoginAuthenticator
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AuthenticationState.Succeeded
authenticate(Request
The request to authenticate
request
)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Authenticate the request using any credentials already associated with the request.

public AuthenticationState
authenticate(Request
The request to authenticate
request
,
Response
The response to use for a challenge.
response
,
Callback
The callback to complete if a challenge is sent
callback
)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Authenticate the request using any credentials already associated with the request or challenging if necessary.

public IdentityService.Association
public AuthenticationState.Succeeded
login(String
The username to validate
username
,
Object
The credential to validate
password
,
Request
The request to authenticate
request
,
Response
The response, which may be updated if the session ID is changed.
response
)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.login.

Authenticate the request with the passed credentials

public void
logout(Request
The authenticated request
request
,
Response
The associated response, which may be updated to clear a session ID.
response
)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.logout.

Logout the authenticated user.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__deferredResponseback to summary
pack-priv static final Response __deferredResponse
_associationback to summary
private IdentityService.Association _association
_authenticatorback to summary
protected final LoginAuthenticator _authenticator
LOGback to summary
private static final Logger LOG

Constructor Detail

DeferredAuthenticationStateback to summary
public DeferredAuthenticationState(LoginAuthenticator authenticator)

Method Detail

authenticateback to summary
public AuthenticationState.Succeeded authenticate(Request request)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Doc from org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Authenticate the request using any credentials already associated with the request. No challenge can be sent. If the login is successful, then the IdentityService#associate(UserIdentity, RunAsToken) method is used and the returned org.eclipse.jetty.security.IdentityService.Association is made available via getAssociation().

Parameters
request:Request

The request to authenticate

Returns:AuthenticationState.Succeeded

A Succeeded authentication or null

Annotations
@Override
authenticateback to summary
public AuthenticationState authenticate(Request request, Response response, Callback callback)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Doc from org.eclipse.jetty.security.AuthenticationState.Deferred.authenticate.

Authenticate the request using any credentials already associated with the request or challenging if necessary. If the login is successful, then the IdentityService#associate(UserIdentity, RunAsToken) method is used and the returned org.eclipse.jetty.security.IdentityService.Association is made available via getAssociation().

Parameters
request:Request

The request to authenticate

response:Response

The response to use for a challenge.

callback:Callback

The callback to complete if a challenge is sent

Returns:AuthenticationState

The next AuthenticationState, if it is ResponseSent, then the callback will be completed.

Annotations
@Override
getAssociationback to summary
public IdentityService.Association getAssociation()

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.getAssociation.

Returns:IdentityService.Association

Doc from org.eclipse.jetty.security.AuthenticationState.Deferred.getAssociation.

Any org.eclipse.jetty.security.IdentityService.Association created during deferred authentication.

Annotations
@Override
loginback to summary
public AuthenticationState.Succeeded login(String username, Object password, Request request, Response response)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.login.

Doc from org.eclipse.jetty.security.AuthenticationState.Deferred.login.

Authenticate the request with the passed credentials

Parameters
username:String

The username to validate

password:Object

The credential to validate

request:Request

The request to authenticate

response:Response

The response, which may be updated if the session ID is changed.

Returns:AuthenticationState.Succeeded

A Succeeded authentication or null

Annotations
@Override
logoutback to summary
public void logout(Request request, Response response)

Implements org.eclipse.jetty.security.AuthenticationState.Deferred.logout.

Doc from org.eclipse.jetty.security.AuthenticationState.Deferred.logout.

Logout the authenticated user.

Parameters
request:Request

The authenticated request

response:Response

The associated response, which may be updated to clear a session ID.

Annotations
@Override