Class X509TokenValidator
- java.lang.Object
-
- org.apache.cxf.sts.token.validator.X509TokenValidator
-
- All Implemented Interfaces:
TokenValidator
public class X509TokenValidator extends Object implements TokenValidator
This class validates an X.509 V.3 certificate (received as a BinarySecurityToken or an X509Data DOM Element). The cert must be known (or trusted) by the STS crypto object.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBASE64_ENCODINGstatic StringX509_V3_TYPE
-
Constructor Summary
Constructors Constructor Description X509TokenValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandleToken(ReceivedToken validateTarget)Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument.booleancanHandleToken(ReceivedToken validateTarget, String realm)Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument.voidsetSubjectConstraints(List<String> subjectConstraints)Set a list of Strings corresponding to regular expression constraints on the subject DN of a certificatevoidsetValidator(org.apache.wss4j.dom.validate.Validator validator)Set the WSS4J Validator instance to use to validate the token.TokenValidatorResponsevalidateToken(TokenValidatorParameters tokenParameters)Validate a Token using the given TokenValidatorParameters.
-
-
-
Field Detail
-
X509_V3_TYPE
public static final String X509_V3_TYPE
- See Also:
- Constant Field Values
-
BASE64_ENCODING
public static final String BASE64_ENCODING
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSubjectConstraints
public void setSubjectConstraints(List<String> subjectConstraints)
Set a list of Strings corresponding to regular expression constraints on the subject DN of a certificate
-
setValidator
public void setValidator(org.apache.wss4j.dom.validate.Validator validator)
Set the WSS4J Validator instance to use to validate the token.- Parameters:
validator- the WSS4J Validator instance to use to validate the token
-
canHandleToken
public boolean canHandleToken(ReceivedToken validateTarget)
Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument.- Specified by:
canHandleTokenin interfaceTokenValidator
-
canHandleToken
public boolean canHandleToken(ReceivedToken validateTarget, String realm)
Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument. The realm is ignored in this token Validator.- Specified by:
canHandleTokenin interfaceTokenValidator
-
validateToken
public TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
Validate a Token using the given TokenValidatorParameters.- Specified by:
validateTokenin interfaceTokenValidator
-
-