Package io.undertow.security.api
Class AuthenticationMechanism.ChallengeResult
java.lang.Object
io.undertow.security.api.AuthenticationMechanism.ChallengeResult
- Enclosing interface:
- AuthenticationMechanism
Simple class to wrap the result of requesting a mechanism sends it's challenge.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChallengeResult
(boolean challengeSent) ChallengeResult
(boolean challengeSent, Integer statusCode) -
Method Summary
Modifier and TypeMethodDescriptionObtain the response code desired by this mechanism for the challenge.boolean
Check if the mechanism did send a challenge.
-
Field Details
-
NOT_SENT
-
-
Constructor Details
-
ChallengeResult
-
ChallengeResult
public ChallengeResult(boolean challengeSent)
-
-
Method Details
-
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.
-