public class JahiaHTTPLoginModule extends Object implements LoginModule
| Constructor and Description |
|---|
JahiaHTTPLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Method to abort the authentication process (phase 2).
|
boolean |
commit()
Method to commit the authentication process (phase 2).
|
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options)
Initialize this LoginModule.
|
boolean |
login()
Method to authenticate a
Subject (phase 1). |
boolean |
logout()
Method which logs out a
Subject. |
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
This method is called by the LoginContext
after this LoginModule has been instantiated.
The purpose of this method is to initialize this
LoginModule with the relevant information.
If this LoginModule does not understand
any of the data stored in sharedState or
options parameters, they can be ignored.
initialize in interface LoginModulesubject - the Subject to be authenticated. callbackHandler - a CallbackHandler for communicating
with the end user (prompting for usernames and
passwords, for example). sharedState - state shared with other configured LoginModules. options - options specified in the login
Configuration for this particular
LoginModule.public boolean login()
throws LoginException
Subject (phase 1).
The implementation of this method authenticates
a Subject. For example, it may prompt for
Subject information such
as a username and password and then attempt to verify the password.
This method saves the result of the authentication attempt
as private state within the LoginModule.
login in interface LoginModuleLoginModule should be ignored.LoginException - if the authentication failspublic boolean commit()
throws LoginException
This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login method), then this method associates relevant
Principals and Credentials with the Subject located in the
LoginModule. If this LoginModule's own
authentication attempted failed, then this method removes/destroys
any state that was originally saved.
commit in interface LoginModuleLoginModule should be ignored.LoginException - if the commit failspublic boolean abort()
throws LoginException
This method is called if the LoginContext's overall authentication failed. (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed).
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login method), then this method cleans up any state
that was originally saved.
abort in interface LoginModuleLoginModule should be ignored.LoginException - if the abort failspublic boolean logout()
throws LoginException
Subject.
An implementation of this method might remove/destroy a Subject's Principals and Credentials.
logout in interface LoginModuleLoginModule should be ignored.LoginException - if the logout failsCopyright © 2004–2021 Jahia Solutions Group SA. All rights reserved.