Class MockTrustEngine<TokenType>

java.lang.Object
org.opensaml.security.testing.MockTrustEngine<TokenType>
All Implemented Interfaces:
TrustEngine<TokenType>

public class MockTrustEngine<TokenType> extends Object implements TrustEngine<TokenType>
  • Field Details

    • trusted

      private boolean trusted
    • throwable

      private Throwable throwable
  • Constructor Details

    • MockTrustEngine

      public MockTrustEngine(boolean flag)
    • MockTrustEngine

      public MockTrustEngine(Throwable t)
  • Method Details

    • 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:
      validate in interface TrustEngine<TokenType>
      Parameters:
      token - security token to validate
      trustBasisCriteria - 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