|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.auth.AuthenticationServer
Authentication service.
This class works in conjunction with a set of AuthenticationHandler
objects,
an Authenticator
object and MethodAuthenticator
objects to securely
establish the identity of a client. The AuthenticationHandler
objects are
responsible for authentication schemes and initially identifying the user. The
Authenticator
and MethodAuthenticator
objects are responsible
for securely associating that identity with subsequent calls.
A typical scenario involves this class throwing an AuthenticationException that includes
a bootstraping MethodAuthenticator object. This MethodAuthenticator object executes
on the client to perform a secure login. This activity results in the creation of
a second MethodAuthenticator object that can endorse client method calls in a way
that be securely verified by the Authenticator class.
Supported API: true
Field Summary | |
private static Authenticator |
AUTHENTICATOR
|
private static AuthenticationHandler[] |
HANDLERS
|
private static boolean |
REAUTH_ALLOWED
|
private static String |
RESOURCE
|
private static boolean |
TO_LOWER_CASE
|
private static boolean |
VERBOSE_SERVER
|
Constructor Summary | |
private |
AuthenticationServer()
|
Method Summary | |
static boolean |
enabled(Class handler)
Check if given authentication handler is enabled. |
static MethodAuthenticator |
getBootstrapAuthenticator()
Get a bootstrap MethodAuthenticator capable of identifying the user. |
static MethodAuthenticator |
getBootstrapAuthenticator(String session_id)
Get a bootstrap MethodAuthenticator capable of identifying the user
for a given session. |
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 MethodAuthenticator |
newMethodAuthenticator(String user)
Create a new MethodAuthenticator object that will
associate the given user name to endorsed method calls. |
static MethodAuthenticator |
newMethodAuthenticator(String user,
String session_id)
Create a new MethodAuthenticator object that will
associate the given user name to endorsed method calls. |
static void |
reauthenticateUser()
Re-authenticate the user name for the current thread. |
static void |
setUserName(String user)
Set authenticated user name for the current thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final boolean VERBOSE_SERVER
private static final AuthenticationHandler[] HANDLERS
private static final Authenticator AUTHENTICATOR
private static final boolean TO_LOWER_CASE
private static final boolean REAUTH_ALLOWED
Constructor Detail |
private AuthenticationServer()
Method Detail |
public static MethodAuthenticator getBootstrapAuthenticator()
MethodAuthenticator
capable of identifying the user.
MethodAuthenticator
objectpublic static MethodAuthenticator getBootstrapAuthenticator(String session_id)
MethodAuthenticator
capable of identifying the user
for a given session.
session_id
- a string identifying the session to be authenticated
MethodAuthenticator
objectpublic static String getUserName()
public static void setUserName(String user)
public static MethodAuthenticator init(MethodAuthenticator authenticator)
authenticator
- the MethodAuthenticator
being initialized
MethodAuthenticator
public static MethodAuthenticator newMethodAuthenticator(String user)
MethodAuthenticator
object that will
associate the given user name to endorsed method calls.
user
- the authenticated user name
MethodAuthenticator
objectpublic static MethodAuthenticator newMethodAuthenticator(String user, String session_id)
MethodAuthenticator
object that will
associate the given user name to endorsed method calls.
user
- the authenticated user name
MethodAuthenticator
objectpublic static boolean enabled(Class handler)
handler
- the AuthenticationHandler
class
public static void reauthenticateUser()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |