wt.auth
Class Authentication

java.lang.Object
  extended by wt.auth.Authentication
All Implemented Interfaces:
RemoteAccess

public class Authentication
extends Object
implements RemoteAccess

Authentication service. This class forwards calls to a server-side authentication server class.

Supported API: true
Extendable: false


Method Summary
static boolean getAllowUserInteraction()
          Get whether the current WTContext should allow user interaction to carry out authentication.
static boolean getDefaultAllowUserInteraction()
          Get default setting of whether user interation should be allowed to carry out authentication.
static String getUserName()
          Get authenticated user name for the current thread.
static MethodAuthenticator init(MethodAuthenticator authenticator)
          Initialization method called from bootstrapping authenticator's init method.
static void main(String[] args)
          Simple tester.
static void reauthenticateUser()
          Re-authenticate the user name for the current thread.
static void setAllowUserInteraction(boolean allow_user_interaction)
          Set whether the current WTContext should allow user interaction to carry out authentication.
static void setDefaultAllowUserInteraction(boolean allow_user_interaction)
          Set default value for whether user interation should be allowed to carry out authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getUserName

public static String getUserName()
                          throws RemoteException
Get authenticated user name for the current thread. If the client has not yet been authenticated, this may result in a MethodAuthenticator object being thrown back to the client to perform a secure login.

Supported API: true

Returns:
the authenticated user name
Throws:
RemoteException

init

public static MethodAuthenticator init(MethodAuthenticator authenticator)
                                throws RemoteException
Initialization method called from bootstrapping authenticator's init method. It can be used to convert bootstrapping authenticator into a real one or to send back another bootstrapping authenticator if the current one failed and there are other login mechanisms available.

Supported API: true

Parameters:
authenticator - the MethodAuthenticator being initialized
Returns:
replacement MethodAuthenticator
Throws:
RemoteException

reauthenticateUser

public static void reauthenticateUser()
                               throws RemoteException
Re-authenticate the user name for the current thread. This will result in a MethodAuthenticator object being thrown back to the client to perform a secure login.

Supported API: true

Throws:
RemoteException

getAllowUserInteraction

public static boolean getAllowUserInteraction()
Get whether the current WTContext should allow user interaction to carry out authentication. This setting can be used by bootstrapping method authenticators to determine if interaction is allowed. The default is true.

Supported API: true

Returns:
true if user interaction is allowed, false if not.

setAllowUserInteraction

public static void setAllowUserInteraction(boolean allow_user_interaction)
Set whether the current WTContext should allow user interaction to carry out authentication. This setting can be used by bootstrapping method authenticators to determine if interaction is allowed. The default is true.

Supported API: true

Parameters:
allow_user_interaction - true if user interaction is allowed, false if not.

getDefaultAllowUserInteraction

public static boolean getDefaultAllowUserInteraction()
Get default setting of whether user interation should be allowed to carry out authentication.

Supported API: true

Returns:
true if user interaction is allowed, false if not.

setDefaultAllowUserInteraction

public static void setDefaultAllowUserInteraction(boolean allow_user_interaction)
Set default value for whether user interation should be allowed to carry out authentication.

Supported API: true

Parameters:
allow_user_interaction - true if user interaction is allowed, false if not.

main

public static void main(String[] args)
                 throws RemoteException,
                        InterruptedException
Simple tester. Calls Authentication.getUserName(). If the first argument is -r, it will then try reauthentication. If user= and password= arguments are specified, they will be made available to username/password based authentication handlers.

Supported API: true

Throws:
RemoteException
InterruptedException