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 CriteriaSet |
buildCriteriaSet(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) |
protected boolean |
evaluate(TokenType token,
CriteriaSet criteriaSet)
Evaluate the token against the specified criteria using the configured trust engine.
|
protected boolean |
evaluate(TokenType token,
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, getActivationCondition, getLogPrefix, invoke, setActivationCondition
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize, 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
doPreInvoke
in class AbstractMessageHandler
MessageHandlerException
@Nullable protected abstract TrustEngine<? super TokenType> resolveTrustEngine(@Nonnull MessageContext messageContext)
messageContext
- the message context which is being evaluated@Nullable protected abstract CriteriaSet buildCriteriaSet(@Nullable 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 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 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 evaluationCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.