| java.lang.Object org.apache.openejb.client.ClientSecurity
ClientSecurity | public class ClientSecurity (Code) | | |
Inner Class :public static class SimpleIdentityResolver implements IdentityResolver | |
IDENTITY_RESOLVER_STRATEGY | final public static String IDENTITY_RESOLVER_STRATEGY(Code) | | |
directAuthentication | public static Object directAuthentication(String username, String password, ServerMetaData server) throws FailedLoginException(Code) | | This is a helper method for login modules. Directly authenticates with the server using the specified
username and password returning the identity token for the client. This methods does not store the
identity token and the caller must arrange for the to be available to the OpenEJB proxies via an
IdentityResolver.
Parameters: username - the username for authentication Parameters: password - the password for authentication Parameters: server - the client identity token throws: FailedLoginException - if the username password combination is not valid |
login | public static void login(String username, String password) throws FailedLoginException(Code) | | Login the spedified user using the specified password. This is a global login for the
entire Java Virtural Machine. If you would like to have a thread scoped login, use
ClientSecurity.login(username, password, true);
This is the equivalent of ClientSecurity.login(username, password, false);
Parameters: username - the user to login Parameters: password - the password for the user throws: FailedLoginException - if the username and password combination are not valid orif there is a problem communiating with the server |
login | public static void login(String username, String password, boolean threadScoped) throws FailedLoginException(Code) | | Login the spedified user using the specified password either globally for the
entire Java Virtural Machine or scoped to the thread.
When using thread scoped login, you should logout in a finally block. This particularly
when using thread pools. If a thread is returned to the pool with a login attached to the
thread the next user of that thread will inherit the thread scoped login.
Parameters: username - the user to login Parameters: password - the password for the user Parameters: threadScoped - if true the login is scoped to the thread; otherwise the login is globalfor the entire Java Virtural Machine throws: FailedLoginException - if the username and password combination are not valid orif there is a problem communiating with the server |
logout | public static void logout()(Code) | | Clears the thread and global login data.
|
|
|