Package io.undertow.security.api
Class AuthenticationMechanism.ChallengeResult
- java.lang.Object
-
- io.undertow.security.api.AuthenticationMechanism.ChallengeResult
-
- Enclosing interface:
- AuthenticationMechanism
public static class AuthenticationMechanism.ChallengeResult extends java.lang.ObjectSimple class to wrap the result of requesting a mechanism sends it's challenge.
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticationMechanism.ChallengeResultNOT_SENT
-
Constructor Summary
Constructors Constructor Description ChallengeResult(boolean challengeSent)ChallengeResult(boolean challengeSent, java.lang.Integer statusCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetDesiredResponseCode()Obtain the response code desired by this mechanism for the challenge.booleanisChallengeSent()Check if the mechanism did send a challenge.
-
-
-
Field Detail
-
NOT_SENT
public static final AuthenticationMechanism.ChallengeResult NOT_SENT
-
-
Method Detail
-
getDesiredResponseCode
public java.lang.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.
-
-