com.sun.xml.wss
Class RealmAuthenticationAdapter

java.lang.Object
  extended by 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
static String UsernameAuthenticator
           
 
Constructor Summary
protected RealmAuthenticationAdapter()
          Creates a new instance of RealmAuthenticator
 
Method Summary
abstract  boolean authenticate(Subject callerSubject, String username, String password)
           
 boolean authenticate(Subject callerSubject, String username, String password, Map runtimeProps)
           
 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)
           
static RealmAuthenticationAdapter newInstance(Object context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UsernameAuthenticator

public static final String UsernameAuthenticator
See Also:
Constant Field Values
Constructor Detail

RealmAuthenticationAdapter

protected RealmAuthenticationAdapter()
Creates a new instance of RealmAuthenticator

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 authentication
username - the username
password - the password
Returns:
true if authentication succeeds
Throws:
com.sun.xml.wss.XWSSecurityException, - if there is an authentication failure
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 authentication
username - the username
password - the password
runtimeProps - Map of runtime properties that can be used in authentication decision
Returns:
true if authentication succeeds
Throws:
com.sun.xml.wss.XWSSecurityException, - if there is an authentication failure
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 authentication
username - the username
passwordDigest - the password-digest
nonce - a nonce sent by the caller in the UsernameToken
created - 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 authentication
username - the username
passwordDigest - the password-digest
nonce - a nonce sent by the caller in the UsernameToken
created - the creation time of the UsernameToken
runtimeProps - 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


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.