Class JAASUsernameTokenValidator

  • All Implemented Interfaces:

    public class JAASUsernameTokenValidator
    extends Object
    implements Validator
    This class validates a processed UsernameToken, extracted from the Credential passed to the validate method. Username/password validation is delegated to JAAS LoginContext.
    • Constructor Detail

      • JAASUsernameTokenValidator

        public JAASUsernameTokenValidator()
    • Method Detail

      • setContextName

        public void setContextName​(String name)
      • getContextName

        public String getContextName()
      • validate

        public Credential validate​(Credential credential,
                                   RequestData data)
                            throws WSSecurityException
        Validate the credential argument. It must contain a non-null UsernameToken. A CallbackHandler implementation is also required to be set. Validator If the password type is either digest or plaintext, it extracts a password from the CallbackHandler and then compares the passwords appropriately. If the password is null it queries a hook to allow the user to validate UsernameTokens of this type.
        Specified by:
        validate in interface Validator
        credential - the Credential to be validated
        data - the RequestData associated with the request
        a validated Credential
        WSSecurityException - on a failed validation