TokenType - type of token which is being evaluated by the underlying trust enginepublic abstract class BaseTrustEngineSecurityHandler<TokenType> extends AbstractMessageHandler
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Logger.
|
private TrustEngine<? super TokenType> |
trustEngine
Trust engine used to verify the particular token type.
|
| Constructor and Description |
|---|
BaseTrustEngineSecurityHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract net.shibboleth.utilities.java.support.resolver.CriteriaSet |
buildCriteriaSet(java.lang.String entityID,
MessageContext messageContext)
Subclasses are required to implement this method to build a criteria set for the trust engine
according to trust engine and application-specific needs.
|
protected boolean |
doPreInvoke(MessageContext messageContext)
Called prior to execution, handlers may override this method to perform pre-processing for a request.
|
protected boolean |
evaluate(TokenType token,
net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)
Evaluate the token against the specified criteria using the configured trust engine.
|
protected boolean |
evaluate(TokenType token,
java.lang.String entityID,
MessageContext messageContext)
Evaluate the token using the configured trust engine against criteria built using
the specified candidate issuer entity ID and message context information.
|
protected TrustEngine<? super TokenType> |
getTrustEngine()
Gets the trust engine used to validate the untrusted token.
|
protected abstract TrustEngine<? super TokenType> |
resolveTrustEngine(MessageContext messageContext)
Resolve a TrustEngine instance of the appropriate type from the message context.
|
doInvoke, doPostInvoke, doPostInvoke, getLogPrefix, invokedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@Nullable private TrustEngine<? super TokenType> trustEngine
@Nullable protected TrustEngine<? super TokenType> getTrustEngine()
protected boolean doPreInvoke(@Nonnull
MessageContext messageContext)
throws MessageHandlerException
If false is returned, execution will not proceed.
If returning successfully, the last step should be to return the result of the superclass version of this method.
doPreInvoke in class AbstractMessageHandlermessageContext - the message context on which to invoke the handlerMessageHandlerException - if there is a problem executing the handler pre-routine@Nullable protected abstract TrustEngine<? super TokenType> resolveTrustEngine(@Nonnull MessageContext messageContext)
messageContext - the message context which is being evaluated@Nullable
protected abstract net.shibboleth.utilities.java.support.resolver.CriteriaSet buildCriteriaSet(@Nullable
java.lang.String entityID,
@Nonnull
MessageContext messageContext)
throws MessageHandlerException
entityID - the candidate issuer entity ID which is being evaluatedmessageContext - the message context which is being evaluatedMessageHandlerException - thrown if criteria set can not be constructedprotected boolean evaluate(@Nonnull
TokenType token,
@Nullable
java.lang.String entityID,
@Nonnull
MessageContext messageContext)
throws MessageHandlerException
token - the token to be evaluatedentityID - the candidate issuer entity ID which is being evaluatedmessageContext - the message context which is being evaluatedMessageHandlerException - thrown if there is a fatal error during trust engine evaluationprotected boolean evaluate(@Nonnull
TokenType token,
@Nullable
net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)
throws MessageHandlerException
token - the token to be evaluatedcriteriaSet - the set of criteria against which to evaluate the tokenMessageHandlerException - thrown if there is a fatal error during trust engine evaluation