Class AuthenticationResult


  • public class AuthenticationResult
    extends Object
    Encapsulates the result of an attempt to authenticate using an AuthenticationProvider.

    The authentication status describes the overall outcome.

    1. If authentication status is SUCCESS, at least one Principal will be populated.
    2. If authentication status is CONTINUE, the authentication has failed because the user supplied incorrect credentials (etc). If the authentication requires it, the next challenge is made available.
    3. If authentication status is ERROR , the authentication decision could not be made due to a failure (such as an external system), the getCause() will provide the underlying exception.
    The main principal provided to the constructor is wrapped in an AuthenticatedPrincipal to make it easier for the rest of the application to identify it among the set of other principals.