Package com.sun.xml.wss
Class RealmAuthenticationAdapter
java.lang.Object
com.sun.xml.wss.RealmAuthenticationAdapter
- Direct Known Subclasses:
DefaultRealmAuthenticationAdapter
This abstract class defines an SPI that Metro Application developers can implement, to handle custom
username/password and username/Password-Digest authentication.
The SPI implementation class needs to
specified as a META-INF/services entry with name "com.sun.xml.xwss.RealmAuthenticator".
A default implementation of this SPI is returned if no entry is configured.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance of RealmAuthenticator -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
authenticate
(Subject callerSubject, String username, String password) boolean
authenticate
(Subject callerSubject, String username, String passwordDigest, String nonce, String created) boolean
authenticate
(Subject callerSubject, String username, String passwordDigest, String nonce, String created, Map runtimeProps) boolean
authenticate
(Subject callerSubject, String username, String password, Map runtimeProps) static RealmAuthenticationAdapter
newInstance
(Object context)
-
Field Details
-
UsernameAuthenticator
- See Also:
-
-
Constructor Details
-
RealmAuthenticationAdapter
protected RealmAuthenticationAdapter()Creates a new instance of RealmAuthenticator
-
-
Method Details
-
authenticate
public abstract boolean authenticate(Subject callerSubject, String username, String password) throws XWSSecurityException - Parameters:
callerSubject
- the callerSubject should contain the appropriate principal's of the caller after a successful authenticationusername
- the usernamepassword
- the password- Returns:
- true if authentication succeeds
- Throws:
XWSSecurityException
- if there is an authentication failure
-
authenticate
public boolean authenticate(Subject callerSubject, String username, String password, Map runtimeProps) throws XWSSecurityException - Parameters:
callerSubject
- the callerSubject should contain the appropriate principal's of the caller after a successful authenticationusername
- the usernamepassword
- the passwordruntimeProps
- Map of runtime properties that can be used in authentication decision- Returns:
- true if authentication succeeds
- Throws:
XWSSecurityException
- if there is an authentication failure
-
authenticate
public boolean authenticate(Subject callerSubject, String username, String passwordDigest, String nonce, String created) throws XWSSecurityException - Parameters:
callerSubject
- the callerSubject should contain the appropriate principal's of the caller after a successful authenticationusername
- the usernamepasswordDigest
- the password-digestnonce
- a nonce sent by the caller in the UsernameTokencreated
- the creation time of the UsernameToken- Returns:
- true if authentication succeeds
- Throws:
XWSSecurityException
- if there is an authentication failure
-
authenticate
public boolean authenticate(Subject callerSubject, String username, String passwordDigest, String nonce, String created, Map runtimeProps) throws XWSSecurityException - Parameters:
callerSubject
- the callerSubject should contain the appropriate principal's of the caller after a successful authenticationusername
- the usernamepasswordDigest
- the password-digestnonce
- a nonce sent by the caller in the UsernameTokencreated
- the creation time of the UsernameTokenruntimeProps
- Map of runtime properties that can be used in authentication decision- Returns:
- true if authentication succeeds
- Throws:
XWSSecurityException
- if there is an authentication failure
-
newInstance
- Parameters:
context
- optional context that can be used to locate the META-INF/services entry "com.sun.xml.xwss.RealmAuthenticator"- Returns:
- a new instance of the RealmAuthenticationAdapter
-