org.apache.wss4j.stax.validate
Class SamlTokenValidatorImpl

java.lang.Object
  extended by org.apache.wss4j.stax.validate.SignatureTokenValidatorImpl
      extended by org.apache.wss4j.stax.validate.SamlTokenValidatorImpl
All Implemented Interfaces:
SamlTokenValidator, SignatureTokenValidator, Validator

public class SamlTokenValidatorImpl
extends SignatureTokenValidatorImpl
implements SamlTokenValidator


Constructor Summary
SamlTokenValidatorImpl()
           
 
Method Summary
protected  void checkConditions(SamlAssertionWrapper samlAssertion)
          Check the Conditions of the Assertion.
protected  void checkOneTimeUse(SamlAssertionWrapper samlAssertion, ReplayCache replayCache)
          Check the "OneTimeUse" Condition of the Assertion.
 boolean isValidateSignatureAgainstProfile()
          Whether to validate the signature of the Assertion (if it exists) against the relevant profile.
 void setFutureTTL(int newFutureTTL)
          Set the time in seconds in the future within which the NotBefore time of an incoming Assertion is valid.
 void setValidateSignatureAgainstProfile(boolean validateSignatureAgainstProfile)
          Whether to validate the signature of the Assertion (if it exists) against the relevant profile.
<T extends SamlSecurityToken & org.apache.xml.security.stax.securityToken.InboundSecurityToken>
T
validate(SamlAssertionWrapper samlAssertionWrapper, org.apache.xml.security.stax.securityToken.InboundSecurityToken subjectSecurityToken, TokenContext tokenContext)
           
protected  void validateAssertion(SamlAssertionWrapper samlAssertion)
          Validate the samlAssertion against schemas/profiles
 
Methods inherited from class org.apache.wss4j.stax.validate.SignatureTokenValidatorImpl
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wss4j.stax.validate.SignatureTokenValidator
validate
 

Constructor Detail

SamlTokenValidatorImpl

public SamlTokenValidatorImpl()
Method Detail

setFutureTTL

public void setFutureTTL(int newFutureTTL)
Set the time in seconds in the future within which the NotBefore time of an incoming Assertion is valid. The default is 60 seconds.


isValidateSignatureAgainstProfile

public boolean isValidateSignatureAgainstProfile()
Whether to validate the signature of the Assertion (if it exists) against the relevant profile. Default is true.


setValidateSignatureAgainstProfile

public void setValidateSignatureAgainstProfile(boolean validateSignatureAgainstProfile)
Whether to validate the signature of the Assertion (if it exists) against the relevant profile. Default is true.


validate

public <T extends SamlSecurityToken & org.apache.xml.security.stax.securityToken.InboundSecurityToken> T validate(SamlAssertionWrapper samlAssertionWrapper,
                                                                                                                 org.apache.xml.security.stax.securityToken.InboundSecurityToken subjectSecurityToken,
                                                                                                                 TokenContext tokenContext)
                                                                                                      throws WSSecurityException
Specified by:
validate in interface SamlTokenValidator
Throws:
WSSecurityException

checkConditions

protected void checkConditions(SamlAssertionWrapper samlAssertion)
                        throws WSSecurityException
Check the Conditions of the Assertion.

Throws:
WSSecurityException

checkOneTimeUse

protected void checkOneTimeUse(SamlAssertionWrapper samlAssertion,
                               ReplayCache replayCache)
                        throws WSSecurityException
Check the "OneTimeUse" Condition of the Assertion. If this is set then the Assertion is cached (if a cache is defined), and must not have been previously cached

Throws:
WSSecurityException

validateAssertion

protected void validateAssertion(SamlAssertionWrapper samlAssertion)
                          throws WSSecurityException
Validate the samlAssertion against schemas/profiles

Throws:
WSSecurityException


Copyright © 2004–2013 The Apache Software Foundation. All rights reserved.