@NotExtensible public final class AuthenticationResult extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AuthenticationResult.Builder
Builder class to build an instance of AuthenticationResult.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static AuthenticationResult.Builder |
failure()
Create a new builder for an unsuccessful response.
|
static AuthenticationResult.Builder |
failure(java.lang.String error,
java.lang.String errorDetail)
Create a new builder for an unsuccessful error response.
|
java.lang.String |
getDiagnosticMessage()
Gets the message that will be only be included in the trace log
for diagnostic purposes.
|
java.lang.String |
getError()
Retrieve the error code to return if an error occurred while processing the
authentication request or
null if an error did not occur. |
java.lang.String |
getErrorDetail()
Retrieve the message to return if an error occurred while processing
the authentication request describing the details of the error
or
null if an error did not occur. |
java.lang.String |
getFlowStateParams()
Retrieve the state parameters to be preserved and resubmitted to the
authenticator to continue a multi-step authentication flow.
|
ScimResourcePrincipal |
getPrincipal()
Retrieve the authenticated user, or
null if additional steps
are required. |
java.lang.String |
getResponseParams()
Retrieve the JSON object specifying the parameters to return that may be
used to continue the authentication process.
|
int |
hashCode() |
boolean |
isSuccessful()
Indicates whether the authentication event is successful.
|
static AuthenticationResult.Builder |
success(ScimResourcePrincipal principal)
Create a new builder for a successful response.
|
java.lang.String |
toString() |
public static AuthenticationResult.Builder success(ScimResourcePrincipal principal)
principal
- The authenticated user.public static AuthenticationResult.Builder failure()
public static AuthenticationResult.Builder failure(java.lang.String error, java.lang.String errorDetail)
Since this response is visible to the client in a potentially unauthenticated context, the authenticator should not expose any sensitive user or server information in the error response.
error
- The error code.errorDetail
- The details about the error.public boolean isSuccessful()
true
if the authentication event is successful, or
false
otherwise.public java.lang.String getError()
null
if an error did not occur.public java.lang.String getErrorDetail()
null
if an error did not occur.public ScimResourcePrincipal getPrincipal()
null
if additional steps
are required. An authenticator should set the principal in the result
if it can identify a user with the provided credentials. Otherwise,
it should return the principal that was provided in the authentication
request.null
if additional steps
are required.public java.lang.String getResponseParams()
null
.public java.lang.String getFlowStateParams()
null
.public java.lang.String getDiagnosticMessage()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object