Apache CXF API

org.apache.cxf.sts.token.validator
Class UsernameTokenValidator

java.lang.Object
  extended by 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
UsernameTokenValidator()
           
 
Method Summary
 boolean canHandleToken(ReceivedToken validateTarget)
          Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument.
 boolean canHandleToken(ReceivedToken validateTarget, String realm)
          Return true if this TokenValidator implementation is capable of validating the ReceivedToken argument.
 void setUsernameTokenRealmCodec(UsernameTokenRealmCodec usernameTokenRealmCodec)
          Set the UsernameTokenRealmCodec instance to use to return a realm from a validated token
 void setValidator(org.apache.wss4j.dom.validate.Validator validator)
          Set the WSS4J Validator instance to use to validate the token.
 TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
          Validate a Token using the given TokenValidatorParameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernameTokenValidator

public UsernameTokenValidator()
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:
canHandleToken in interface TokenValidator

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:
canHandleToken in interface TokenValidator

validateToken

public TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
Validate a Token using the given TokenValidatorParameters.

Specified by:
validateToken in interface TokenValidator

Apache CXF API

Apache CXF