The Authentication state can be one of several sub-types that reflects where the request is in the many different authentication cycles. Authentication might not yet be checked or it might be checked and failed, checked and deferred or succeeded.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | AuthenticationState.Deferred
Authentication is Deferred, either so that credentials can later be passed
with |
| public static interface | AuthenticationState.ResponseSent
Authentication Response sent state. |
| public static class | AuthenticationState.ServeAs
The |
| public static interface | AuthenticationState.Succeeded
A successful Authentication with User information. |
| Modifier and Type | Field and Description |
|---|---|
| public static final AuthenticationState | CHALLENGE
Authentication challenge sent. |
| public static final AuthenticationState | SEND_FAILURE
Authentication failure sent. |
| public static final AuthenticationState | SEND_SUCCESS
Authentication success sent. |
| Modifier and Type | Method and Description |
|---|---|
| public static AuthenticationState. | Returns: ASucceeded authentiction or nullThe request to query. request)Get successful authentication for a request. |
| public static AuthenticationState. | Returns: ASucceeded authentication or null. If null is returned, then the callback
will be completed.The request to query. request, Response The response to use for a challenge or error response, Callback The collback to complete if a challenge or error is sent. callback)Get successful authentication for a request. |
| public static AuthenticationState. | |
| public static AuthenticationState | Returns: The authentication state of the request or null if none.The request to query request)Get the authentication state of a request |
| public static Principal | Returns: TheUserPrincipal of any Succeeded authentication state, potential
after validating a Deferred state.The request to query request)Get the |
| public static AuthenticationState. | |
| public static boolean | |
| public static void | setAuthenticationState(Request
The request to update request, AuthenticationState the state to set on the request. authenticationState)Set the authentication state of a request. |
| CHALLENGE | back to summary |
|---|---|
| public static final AuthenticationState CHALLENGE Authentication challenge sent. This convenience instance is for when an authentication challenge has been sent. | |
| SEND_FAILURE | back to summary |
|---|---|
| public static final AuthenticationState SEND_FAILURE Authentication failure sent. This convenience instance is for when an authentication failure has been sent. | |
| SEND_SUCCESS | back to summary |
|---|---|
| public static final AuthenticationState SEND_SUCCESS Authentication success sent. This convenience instance is for when an authentication success has been sent. | |
| authenticate | back to summary |
|---|---|
| public static AuthenticationState. Get successful authentication for a request. If the
| |
| authenticate | back to summary |
|---|---|
| public static AuthenticationState. Get successful authentication for a request. If the
| |
| defer | back to summary |
|---|---|
| public static AuthenticationState. | |
| getAuthenticationState | back to summary |
|---|---|
| public static AuthenticationState getAuthenticationState(Request request) Get the authentication state of a request
| |
| getUserPrincipal | back to summary |
|---|---|
| public static Principal getUserPrincipal(Request request) Get the
| |
| login | back to summary |
|---|---|
| public static AuthenticationState. Attempt to login a request using the passed credentials.
The current
| |
| logout | back to summary |
|---|---|
| public static boolean logout(Request request, Response response) | |
| setAuthenticationState | back to summary |
|---|---|
| public static void setAuthenticationState(Request request, AuthenticationState authenticationState) Set the authentication state of a request.
| |
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).
| Modifier and Type | Class and Description |
|---|---|
| public static interface | AuthenticationState.Deferred.DeferredResponse
A tag interface used to identify a |
| Modifier and Type | Method and Description |
|---|---|
| public AuthenticationState. | Returns: ASucceeded authentication or nullThe request to authenticate request)Hides org. |
| 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)Hides org. |
| public IdentityService. | Returns: Anyorg. created during
deferred authentication.
|
| public static boolean | Returns: true if this response is from a deferred call toauthenticate(Request)the response response)
|
| public AuthenticationState. | Returns: ASucceeded authentication or nullThe 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)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)Hides org. |
| authenticate | back to summary |
|---|---|
| public AuthenticationState. Hides org. Authenticate the request using any credentials already associated with the request.
No challenge can be sent. If the login is successful, then the
| |
| authenticate | back to summary |
|---|---|
| public AuthenticationState authenticate(Request request, Response response, Callback callback) Hides org. Authenticate the request using any credentials already associated with the request or
challenging if necessary. If the login is successful, then the
| |
| getAssociation | back to summary |
|---|---|
public IdentityService.
| |
| isDeferred | back to summary |
|---|---|
public static boolean isDeferred(Response response)
| |
| login | back to summary |
|---|---|
| public AuthenticationState. Authenticate the request with the passed credentials | |
| logout | back to summary |
|---|---|
| public void logout(Request request, Response response) Hides org. Logout the authenticated user. | |
Response that might be passed to
Authenticator#validateRequest(Request, Response, Callback) while
doing deferred authentication when a challenge cannot be sent.
authenticate(Request)
SecurityHandler will use this to wrap the Request.
And then will return a Deferred authentication to bypass security constraints.
| Modifier and Type | Method and Description |
|---|---|
| public Request |
| _uri | back to summary |
|---|---|
| private final HttpURI _uri | |
| ServeAs | back to summary |
|---|---|
| public ServeAs(HttpURI uri) | |
| wrap | back to summary |
|---|---|
| public Request wrap(Request request) | |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public UserIdentity | |
| public default Principal | |
| public boolean | |
| public void | logout(Request
the request request, Response the response response)Hides org. |
| getAuthenticationType | back to summary |
|---|---|
public String getAuthenticationType()
| |
| getUserIdentity | back to summary |
|---|---|
public UserIdentity getUserIdentity()
| |
| getUserPrincipal | back to summary |
|---|---|
| public default Principal getUserPrincipal() Overrides default org.
| |
| isUserInRole | back to summary |
|---|---|
public boolean isUserInRole(String role)
| |
| logout | back to summary |
|---|---|
| public void logout(Request request, Response response) Hides org. Remove any user information that may be present in the request such that a call to getUserPrincipal/getRemoteUser will return null. | |