The SAMLTokenValidator is used to validate SAML (1.1 and 2.0) tokens. The following properties can be set directly on the SAMLTokenValidator:
void setValidator(Validator validator)- Set the WSS4J Validator instance to use to validate the received certificate. The default is SignatureTrustValidator.
void setSamlRealmCodec(SAMLRealmCodec samlRealmCodec)- Set the SAMLRealmCodec instance to use to return a realm from a validated token.
void setSubjectConstraints(List<String> subjectConstraints)- Set a list of Strings corresponding to regular expression constraints on the subject DN of a certificate that was used to sign an Assertion.
These methods are covered in more detail below. The Assertion is first checked to make sure that it is well-formed. If a cache is defined, then the hashcode of the Assertion is checked against the hash of all assertions in the cache. If a match is found in the cache, then the Assertion is taken to be valid. If a match is not found, then the Assertion is validated.