Class Result
java.lang.Object
org.forgerock.openig.tools.jwt.validation.Result
A 
Result of a JWT validation.- 
Method Summary
Modifier and TypeMethodDescriptionReturn this result as a completedPromise.static ResultReturns aResultrepresenting validation failure.Return the Violation if it is present,nullotherwise.booleanReturnstrueif this Result is a failure,falseotherwise.booleanReturnstrueif this Result is a success,falseotherwise.static Resultsuccess()Returns aResultrepresenting validation success. 
- 
Method Details
- 
success
Returns aResultrepresenting validation success.- Returns:
 - a Result containing no 
Violation. 
 - 
failure
Returns aResultrepresenting validation failure.- Parameters:
 violation- The Violation responsible of this failure, notnull.- Returns:
 - a Result containing the Violation.
 
 - 
isSuccess
public boolean isSuccess()Returnstrueif this Result is a success,falseotherwise.- Returns:
 trueif this Result is a success,falseotherwise.
 - 
isFailure
public boolean isFailure()Returnstrueif this Result is a failure,falseotherwise.- Returns:
 trueif this Result is a failure,falseotherwise.
 - 
getViolation
Return the Violation if it is present,nullotherwise.- Returns:
 - the Violation if it is present, 
nullotherwise. 
 - 
asPromise
Return this result as a completedPromise.- Returns:
 - this result as a completed 
Promise. 
 
 -