wt.auth
Class SimpleAuthenticator

java.lang.Object
  extended bywt.auth.SimpleAuthenticator
All Implemented Interfaces:
Authenticator

public class SimpleAuthenticator
extends Object
implements Authenticator

A simple Authenticator implementation based on passing the validated user name back and forth to the client.

Supported API: true
Extendable: false


Field Summary
private static String RESOURCE
           
private static String versionID
           
 
Constructor Summary
SimpleAuthenticator()
           
 
Method Summary
 String getUserName(Object auth)
          Get authenticated user name.
 MethodAuthenticator newMethodAuthenticator(String user)
          Create a new MethodAuthenticator object that will associate the given user name to endorsed method calls.
 MethodAuthenticator newMethodAuthenticator(String user, String session_id)
          Create a new MethodAuthenticator object that will associate the given user name to endorsed method calls for an existing session.
 void reauthenticateUser(Object auth)
          Initiate re-authentication for the current session.
 Object setUserName(String user)
          Set authenticated user name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values
Constructor Detail

SimpleAuthenticator

public SimpleAuthenticator()
Method Detail

newMethodAuthenticator

public MethodAuthenticator newMethodAuthenticator(String user)
Create a new MethodAuthenticator object that will associate the given user name to endorsed method calls.

Supported API: false

Specified by:
newMethodAuthenticator in interface Authenticator
Parameters:
user - the authenticated user name
Returns:
MethodAuthenticator object

newMethodAuthenticator

public MethodAuthenticator newMethodAuthenticator(String user,
                                                  String session_id)
Create a new MethodAuthenticator object that will associate the given user name to endorsed method calls for an existing session. This method should never be called because SimpleAuthenticator does not support the notion of sessions.

Supported API: false

Specified by:
newMethodAuthenticator in interface Authenticator
Parameters:
user - the authenticated user name
session_id - string identifying the target session
Returns:
MethodAuthenticator object

getUserName

public String getUserName(Object auth)
Get authenticated user name. This method uses an authentication object added to the method call by a MethodAuthenticator endorsement to determine the authenticated user name.

Supported API: false

Specified by:
getUserName in interface Authenticator
Parameters:
auth - authentication object for the current call
Returns:
the authenticated user name

setUserName

public Object setUserName(String user)
Set authenticated user name. This method returns an authentication object that will cause cause getUserName to return the given name.

Supported API: false

Specified by:
setUserName in interface Authenticator
Parameters:
user - authenticated user name
Returns:
authentication object for the current call

reauthenticateUser

public void reauthenticateUser(Object auth)
Initiate re-authentication for the current session.

Supported API: false

Specified by:
reauthenticateUser in interface Authenticator
Parameters:
auth - authentication object for the current call