Package com.sun.xml.wss
Class RealmAuthenticationAdapter
- java.lang.Object
-
- com.sun.xml.wss.RealmAuthenticationAdapter
-
- Direct Known Subclasses:
DefaultRealmAuthenticationAdapter
public abstract class RealmAuthenticationAdapter extends Object
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 Modifier and Type Field Description static String
UsernameAuthenticator
-
Constructor Summary
Constructors Modifier Constructor Description protected
RealmAuthenticationAdapter()
Creates a new instance of RealmAuthenticator
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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 Detail
-
UsernameAuthenticator
public static final String UsernameAuthenticator
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
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
-
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
public static RealmAuthenticationAdapter newInstance(Object context)
- 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
-
-