Package org.opensaml.security.trust.impl
Class ChainingTrustEngine<TokenType>
java.lang.Object
org.opensaml.security.trust.impl.ChainingTrustEngine<TokenType>
- Type Parameters:
TokenType- the token type this trust engine evaluates
- All Implemented Interfaces:
TrustEngine<TokenType>
Evaluate a token in sequence using a chain of subordinate trust engines. If the token may be established as trusted
by any of the subordinate engines, the token is considered trusted. Otherwise it is considered untrusted.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<TrustEngine<? super TokenType>>The chain of subordinate trust engines.private final org.slf4j.LoggerClass logger. -
Constructor Summary
ConstructorsConstructorDescriptionChainingTrustEngine(List<TrustEngine<? super TokenType>> chain) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionList<TrustEngine<? super TokenType>>getChain()Get the list of configured trust engines which constitute the trust evaluation chain.booleanvalidate(TokenType token, CriteriaSet trustBasisCriteria) Validates the token against trusted information obtained in an implementation-specific manner.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
engines
The chain of subordinate trust engines.
-
-
Constructor Details
-
ChainingTrustEngine
public ChainingTrustEngine(@Nonnull @NonnullElements @ParameterName(name="chain") List<TrustEngine<? super TokenType>> chain) Constructor.- Parameters:
chain- the list of trust engines in the chain
-
-
Method Details
-
getChain
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<TrustEngine<? super TokenType>> getChain()Get the list of configured trust engines which constitute the trust evaluation chain.- Returns:
- the modifiable list of trust engines in the chain
-
validate
public boolean validate(@Nonnull TokenType token, @Nullable CriteriaSet trustBasisCriteria) throws SecurityException Validates the token against trusted information obtained in an implementation-specific manner.- Specified by:
validatein interfaceTrustEngine<TokenType>- Parameters:
token- security token to validatetrustBasisCriteria- criteria used to describe and/or resolve the information which serves as the basis for trust evaluation- Returns:
- true iff the token is trusted and valid
- Throws:
SecurityException- thrown if there is a problem validating the security token
-