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 CallbackHandler
getCallbackHandler(String name, String password)
String
getContextName()
void
setContextName(String name)
Credential
validate(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:
validate
in 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)
-
-