public class LoginService extends Object
| Constructor and Description |
|---|
LoginService(ESAuthenticationControlType authenticationControlType,
EMFStoreSessions sessions,
ESOrgUnitProvider orgUnitProvider,
ESOrgUnitResolver orgUnitResolver)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ESAuthenticationInformation |
logIn(String username,
String password,
ESClientVersionInfo clientVersionInfo)
Login the given user with the provided password and client version.
|
void |
logout(ESSessionId sessionId)
Logout the given session.
|
boolean |
verifyUser(String username,
String password,
ESClientVersionInfo clientVersionInfo)
Checks whether the given credentials are valid without logging the client in.
|
public LoginService(ESAuthenticationControlType authenticationControlType, EMFStoreSessions sessions, ESOrgUnitProvider orgUnitProvider, ESOrgUnitResolver orgUnitResolver)
authenticationControlType - the desired type authentication control typesessions - a ESSessions map that will be updated in case an user successfully loginsorgUnitProvider - an ESOrgUnitProvider that provides access to all organizational units known by EMFStore.
This may be consumed by an ESUserVerifier but boesn't necessarily needs to happen.
It's absolutely fine if ESUserVerifier ignore the provider.orgUnitResolver - an ESOrgUnitResolver for resolving any roles and groups on a given organizational unitpublic ESAuthenticationInformation logIn(String username, String password, ESClientVersionInfo clientVersionInfo) throws AccessControlException
username - the name of the user to be logged inpassword - the password of the userclientVersionInfo - the client version of the userESAuthenticationInformation in case the login was successfullAccessControlException - in case user verification failspublic void logout(ESSessionId sessionId) throws AccessControlException
sessionId - the ID of the session that should be logged outAccessControlException - in case the the session ID is nullpublic boolean verifyUser(String username, String password, ESClientVersionInfo clientVersionInfo)
username - the user namepassword - the encrypted password of the userclientVersionInfo - the client's versiontrue, if the user's credentials are valid, false otherwiseCopyright © 2017. All rights reserved.