Class EvidenceDecodePrincipalCallback
java.lang.Object
org.wildfly.security.auth.callback.EvidenceDecodePrincipalCallback
- All Implemented Interfaces:
Callback, ExtendedCallback
A server-side
Callback to pass the decoded evidence principal from the callback handler
to the authentication mechanism.- Since:
- 1.10.0
- Author:
- Farah Juma
-
Constructor Summary
ConstructorsConstructorDescriptionEvidenceDecodePrincipalCallback(org.wildfly.security.evidence.Evidence evidence) Construct a new instance of thisCallback. -
Method Summary
Modifier and TypeMethodDescription<C extends org.wildfly.security.evidence.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 org.wildfly.security.evidence.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.org.wildfly.security.evidence.EvidenceGet the evidence being decoded.<C extends org.wildfly.security.evidence.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 org.wildfly.security.evidence.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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExtendedCallback
isOptional, needsInformation
-
Constructor Details
-
EvidenceDecodePrincipalCallback
public EvidenceDecodePrincipalCallback(org.wildfly.security.evidence.Evidence evidence) Construct a new instance of thisCallback.- Parameters:
evidence- the evidence to be decoded
-
-
Method Details
-
getEvidence
public org.wildfly.security.evidence.Evidence getEvidence()Get the evidence being decoded.- Returns:
- the evidence being decoded
-
getEvidence
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 benull)- Returns:
- the evidence, or
nullif the criteria wasn't met
-
getEvidence
public <C extends org.wildfly.security.evidence.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 benull)algorithmName- the algorithm name- Returns:
- the evidence, or
nullif the criteria are not met
-
applyToEvidence
public <C extends org.wildfly.security.evidence.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 typeR- the return type- Parameters:
evidenceType- the evidence type class (must not benull)function- the function to apply (must not benull)- Returns:
- the result of the function, or
nullif the criteria are not met
-
applyToEvidence
public <C extends org.wildfly.security.evidence.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 typeR- the return type- Parameters:
evidenceType- the evidence type class (must not benull)algorithmName- the algorithm namefunction- the function to apply (must not benull)- Returns:
- the result of the function, or
nullif the criteria are not met
-