Class AuthenticationMechanism.ChallengeResult

  • Enclosing interface:
    AuthenticationMechanism

    public static class AuthenticationMechanism.ChallengeResult
    extends Object
    Simple class to wrap the result of requesting a mechanism sends it's challenge.
    • Constructor Detail

      • ChallengeResult

        public ChallengeResult​(boolean challengeSent,
                               Integer statusCode)
      • ChallengeResult

        public ChallengeResult​(boolean challengeSent)
    • Method Detail

      • getDesiredResponseCode

        public Integer getDesiredResponseCode()
        Obtain the response code desired by this mechanism for the challenge.

        Where multiple mechanisms are in use concurrently all of the requested response codes will be checked and the most suitable one selected. If no specific response code is required any value less than 0 can be set.

        Returns:
        The desired response code or null if no code specified.
      • isChallengeSent

        public boolean isChallengeSent()
        Check if the mechanism did send a challenge.

        Some mechanisms do not send a challenge and just rely on the correct information to authenticate a user being available in the request, in that case it would be normal for the mechanism to set this to false.

        Returns:
        true if a challenge was sent, false otherwise.