javax.security.auth.login
public class LoginContext extends Object
Constructor Summary | |
---|---|
LoginContext(String name) | |
LoginContext(String name, CallbackHandler cbHandler) | |
LoginContext(String name, Subject subject) | |
LoginContext(String name, Subject subject, CallbackHandler cbHandler) | |
LoginContext(String name, Subject subject, CallbackHandler cbHandler, Configuration config) |
Method Summary | |
---|---|
Subject | getSubject()
Returns the authenticated subject, or the parameter passed to one
of the constructors. |
void | login()
Logs a subject in, using all login modules configured for this
application. |
void | logout()
Logs a subject out, cleaning up any state that may be in memory.
|
Since: 1.5
null
is returned if the previous
login attempt failed and there was no subject provided.
Returns: The subject, or null.
Throws: LoginException If logging in fails.
Throws: LoginException If logging out fails.