wt.session
Class SessionAuthenticator

java.lang.Object
  extended bywt.session.SessionAuthenticator
All Implemented Interfaces:
Authenticator

public class SessionAuthenticator
extends Object
implements Authenticator

An Authenticator implementation based on passing a known session id back and forth to the client.

Supported API: true
Extendable: false


Field Summary
private static String REAUTH_FLAG_KEY
           
private static String RESOURCE
           
private static String USER_NAME_KEY
           
 
Fields inherited from interface wt.auth.Authenticator
versionID
 
Constructor Summary
SessionAuthenticator()
           
 
Method Summary
 String getUserName(Object auth)
          Get the authenticated user name associated with the given session authenticator.
 MethodAuthenticator newMethodAuthenticator(String user)
          Create a new MethodAuthenticator object that will associate endorsed calls to a session with the given user name.
 MethodAuthenticator newMethodAuthenticator(String user, String session_id)
          Create a new MethodAuthenticator object that will associate endorsed calls from the given session with the given user name.
 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

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

USER_NAME_KEY

private static final String USER_NAME_KEY
See Also:
Constant Field Values

REAUTH_FLAG_KEY

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

SessionAuthenticator

public SessionAuthenticator()
Method Detail

newMethodAuthenticator

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

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 endorsed calls from the given session with the given user name. This can only be called when re-authenticating an existing session.

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 the authenticated user name associated with the given session authenticator. This may trigger authentication if the associated session is not yet authenticated.

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