|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.server.accesscontrol.LoginService
public class LoginService
Service for logging users out and in. The user verification step is customizable via an extension point.
Constructor Summary | |
---|---|
LoginService(ESAuthenticationControlType authenticationControlType,
ESSessions sessions,
ESOrgUnitProvider orgUnitProvider,
ESOrgUnitResolver orgUnitResolver)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoginService(ESAuthenticationControlType authenticationControlType, ESSessions 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 unitMethod Detail |
---|
public 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 user
ESAuthenticationInformation
in case the login was successfull
AccessControlException
- in case user verification failspublic void logout(ESSessionId sessionId) throws AccessControlException
sessionId
- the ID of the session that should be logged out
AccessControlException
- 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 version
true
, if the user's credentials are valid, false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |