Package wt.auth
Class Authentication
java.lang.Object
wt.auth.Authentication
- All Implemented Interfaces:
RemoteAccess
Authentication service.
This class forwards calls to a server-side authentication server class.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanGet whether the currentWTContextshould allow user interaction to carry out authentication.static booleanGet default setting of whether user interation should be allowed to carry out authentication.static StringGet authenticated user name for the current thread.static MethodAuthenticatorinit(MethodAuthenticator authenticator) Initialization method called from bootstrapping authenticator's init method.static voidSimple tester.static voidRe-authenticate the user name for the current thread.static voidsetAllowUserInteraction(boolean allow_user_interaction) Set whether the currentWTContextshould allow user interaction to carry out authentication.static voidsetDefaultAllowUserInteraction(boolean allow_user_interaction) Set default value for whether user interation should be allowed to carry out authentication.
-
Method Details
-
getUserName
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
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- theMethodAuthenticatorbeing initialized- Returns:
- replacement
MethodAuthenticator - Throws:
RemoteException
-
reauthenticateUser
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 currentWTContextshould 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 currentWTContextshould 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
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:
RemoteExceptionInterruptedException
-