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 Object
Simple class to wrap the result of requesting a mechanism sends it's challenge.
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticationMechanism.ChallengeResult
NOT_SENT
-
Constructor Summary
Constructors Constructor Description ChallengeResult(boolean challengeSent)
ChallengeResult(boolean challengeSent, Integer statusCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getDesiredResponseCode()
Obtain the response code desired by this mechanism for the challenge.boolean
isChallengeSent()
Check if the mechanism did send a challenge.
-
-
-
Field Detail
-
NOT_SENT
public static final AuthenticationMechanism.ChallengeResult NOT_SENT
-
-
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.
-
-