public class LocalAuthContext extends Object implements AuthContext
LoginContext
AuthContext
Modifier | Constructor and Description |
---|---|
protected |
LocalAuthContext(LoginModuleConfig config,
CallbackHandler cbHandler,
Subject subject)
Create Context and set Subject to extend its authentication
|
Modifier and Type | Method and Description |
---|---|
Subject |
getSubject()
Return the authenticated Subject.
|
void |
login()
Perform the authentication and, if successful, associate Principals and Credentials
with the authenticated
Subject . |
void |
logout()
Logout the
Subject . |
protected LocalAuthContext(LoginModuleConfig config, CallbackHandler cbHandler, Subject subject)
config
- Configuration to be used for the LoginModulecbHandler
- CallbackHandler for the LoginModulesubject
- Subject if a pre-authenticated existspublic void login() throws LoginException
AuthContext
Subject
.login
in interface AuthContext
LoginException
- if the authentication fails.LoginContext.login()
public Subject getSubject()
AuthContext
getSubject
in interface AuthContext
null
if authentication failed.LoginContext.getSubject()
public void logout() throws LoginException
AuthContext
Subject
.logout
in interface AuthContext
LoginException
- if the logout fails.LoginContext.logout()
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.