Class EvidenceVerifyCallback
- java.lang.Object
- 
- org.wildfly.security.auth.callback.EvidenceVerifyCallback
 
- 
- All Implemented Interfaces:
- Callback,- ExtendedCallback
 
 public class EvidenceVerifyCallback extends Object implements ExtendedCallback ACallbackfor use where credential verification is required.- Author:
- Darran Lofthouse
 
- 
- 
Constructor SummaryConstructors Constructor Description EvidenceVerifyCallback(Evidence evidence)Construct a new instance of thisCallback.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends Evidence,R>
 RapplyToEvidence(Class<C> evidenceType, String algorithmName, Function<C,R> function)Apply the given function to the acquired evidence, if it is set and of the given type and algorithm.<C extends Evidence,R>
 RapplyToEvidence(Class<C> evidenceType, Function<C,R> function)Apply the given function to the acquired evidence, if it is set and of the given type.EvidencegetEvidence()Get the evidence being verified.<C extends Evidence>
 CgetEvidence(Class<C> evidenceType)Get the acquired evidence, if it is set and of the given type, and if so, return the evidence cast to the type.<C extends Evidence>
 CgetEvidence(Class<C> evidenceType, String algorithmName)Get the acquired evidence, if it is set and of the given type and algorithm, and if so, return the evidence cast to the type.booleanisOptional()ThisCallbackis not optional as verification is required.booleanisVerified()Get the verification state for the evidence referenced here.booleanneedsInformation()ThisCallbackneeds to know if evidence validation was successful.voidsetVerified(boolean verified)Set if the evidence referenced here has been verified.
 
- 
- 
- 
Field Detail- 
evidenceprivate final Evidence evidence 
 - 
verifiedprivate boolean verified 
 
- 
 - 
Method Detail- 
getEvidencepublic Evidence getEvidence() Get the evidence being verified.- Returns:
- the evidence being verified
 
 - 
getEvidencepublic <C extends Evidence> C getEvidence(Class<C> evidenceType) Get the acquired evidence, if it is set and of the given type, and if so, return the evidence cast to the type.- Type Parameters:
- C- the evidence type
- Parameters:
- evidenceType- the evidence type class (must not be- null)
- Returns:
- the evidence, or nullif the criteria wasn't met
 
 - 
getEvidencepublic <C extends Evidence> C getEvidence(Class<C> evidenceType, String algorithmName) Get the acquired evidence, if it is set and of the given type and algorithm, and if so, return the evidence cast to the type.- Type Parameters:
- C- the evidence type
- Parameters:
- evidenceType- the evidence type class (must not be- null)
- algorithmName- the algorithm name
- Returns:
- the evidence, or nullif the criteria are not met
 
 - 
applyToEvidencepublic <C extends Evidence,R> R applyToEvidence(Class<C> evidenceType, Function<C,R> function) Apply the given function to the acquired evidence, if it is set and of the given type.- Type Parameters:
- C- the evidence type
- R- the return type
- Parameters:
- evidenceType- the evidence type class (must not be- null)
- function- the function to apply (must not be- null)
- Returns:
- the result of the function, or nullif the criteria are not met
 
 - 
applyToEvidencepublic <C extends Evidence,R> R applyToEvidence(Class<C> evidenceType, String algorithmName, Function<C,R> function) Apply the given function to the acquired evidence, if it is set and of the given type and algorithm.- Type Parameters:
- C- the evidence type
- R- the return type
- Parameters:
- evidenceType- the evidence type class (must not be- null)
- algorithmName- the algorithm name
- function- the function to apply (must not be- null)
- Returns:
- the result of the function, or nullif the criteria are not met
 
 - 
setVerifiedpublic void setVerified(boolean verified) Set if the evidence referenced here has been verified.- Parameters:
- verified- the verification state of the evidence
 
 - 
isVerifiedpublic boolean isVerified() Get the verification state for the evidence referenced here.- Returns:
- trueif the evidence has been verified,- falseotherwise
 
 - 
isOptionalpublic boolean isOptional() ThisCallbackis not optional as verification is required.- Specified by:
- isOptionalin interface- ExtendedCallback
- Returns:
- trueif the callback is optional,- falseif it is mandatory
 
 - 
needsInformationpublic boolean needsInformation() ThisCallbackneeds to know if evidence validation was successful.- Specified by:
- needsInformationin interface- ExtendedCallback
- Returns:
- trueif the callback is requesting information,- falseif it is only providing information
 
 
- 
 
-