Class UsernameTokenValidator
- java.lang.Object
-
- org.apache.cxf.sts.token.validator.UsernameTokenValidator
-
- All Implemented Interfaces:
TokenValidator
public class UsernameTokenValidator extends Object implements TokenValidator
This class validates a wsse UsernameToken.
-
-
Constructor Summary
Constructors Constructor Description UsernameTokenValidator()
-
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.SubjectRoleParsergetRoleParser()voidsetRoleParser(SubjectRoleParser roleParser)voidsetUsernameTokenRealmCodec(UsernameTokenRealmCodec usernameTokenRealmCodec)Set the UsernameTokenRealmCodec instance to use to return a realm from a validated tokenvoidsetValidator(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.
-
-
-
Method Detail
-
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
-
setUsernameTokenRealmCodec
public void setUsernameTokenRealmCodec(UsernameTokenRealmCodec usernameTokenRealmCodec)
Set the UsernameTokenRealmCodec instance to use to return a realm from a validated token- Parameters:
usernameTokenRealmCodec- the UsernameTokenRealmCodec instance to use to return a realm from a validated 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
-
getRoleParser
public SubjectRoleParser getRoleParser()
-
setRoleParser
public void setRoleParser(SubjectRoleParser roleParser)
-
-