Package org.apache.wss4j.dom.validate
Class JAASUsernameTokenValidator
- java.lang.Object
-
- org.apache.wss4j.dom.validate.JAASUsernameTokenValidator
-
-
Constructor Summary
Constructors Constructor Description JAASUsernameTokenValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CallbackHandlergetCallbackHandler(String name, String password)StringgetContextName()voidsetContextName(String name)Credentialvalidate(Credential credential, RequestData data)Validate the credential argument.
-
-
-
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:
validatein interfaceValidator- Parameters:
credential- the Credential to be validateddata- the RequestData associated with the request- Returns:
- a validated Credential
- Throws:
WSSecurityException- on a failed validation
-
getCallbackHandler
protected CallbackHandler getCallbackHandler(String name, String password)
-
-