1 package org.opensaml.xml.security.trust; 2 3 import org.opensaml.xml.security.CriteriaSet; 4 import org.opensaml.xml.security.SecurityException; 5 6 /** 7 * Evaluates the trustworthiness and validity of a token against 8 * implementation-specific requirements. 9 * 10 * @param <TokenType> the token type this trust engine evaluates 11 */ 12 public interface TrustEngine<TokenType> { 13 14 /** 15 * Validates the token against trusted information obtained in an 16 * implementation-specific manner. 17 * 18 * @param token security token to validate 19 * @param trustBasisCriteria criteria used to describe and/or resolve the information 20 * which serves as the basis for trust evaluation 21 * 22 * @return true if the token is trusted and valid, false if not 23 * 24 * @throws SecurityException thrown if there is a problem validating the security token 25 */ 26 public boolean validate(TokenType token, CriteriaSet trustBasisCriteria) throws SecurityException; 27 }