public class SecuredLoginServiceImpl extends Object implements LoginService
| Constructor and Description |
|---|
SecuredLoginServiceImpl(GenericAuthenticationService authenticationService,
SessionService sessionService,
SessionAccessor sessionAccessor,
IdentityService identityService,
TechnicalLoggerService tenantTechnicalLoggerService) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
authenticationFailed()
Processes the failed authentication behaviour.
|
protected void |
debugLog(String message) |
protected TechnicalUser |
getTechnicalUser(long tenantId) |
boolean |
isValid(long sessionId) |
SSession |
login(Map<String,Serializable> credentials)
generic login approach to handle outer authentication service like CAS or OAuth or whatever...
|
void |
logout(long sessionId) |
protected String |
retrievePasswordFromCredentials(Map<String,Serializable> credentials)
retrieve password from credentials assuming it is stored under the
AuthenticationConstants.BASIC_PASSWORD key |
protected String |
retrieveUsernameFromCredentials(Map<String,Serializable> credentials)
retrieve username from credentials assuming it is stored under the
AuthenticationConstants.BASIC_USERNAME key |
public SecuredLoginServiceImpl(GenericAuthenticationService authenticationService, SessionService sessionService, SessionAccessor sessionAccessor, IdentityService identityService, TechnicalLoggerService tenantTechnicalLoggerService)
public SSession login(Map<String,Serializable> credentials) throws SLoginException, SUserNotFoundException
LoginServicelogin in interface LoginServicecredentials - the parameters to use to loginSLoginException - if login failsSUserNotFoundException - if the user does not exist in the databaseprotected void authenticationFailed()
throws SLoginException
SLoginException - the appropriate exceptionprotected String retrievePasswordFromCredentials(Map<String,Serializable> credentials) throws SLoginException
AuthenticationConstants.BASIC_PASSWORD keycredentials - the credentials to checkSLoginException - if password is absent or if credentials is nullprotected String retrieveUsernameFromCredentials(Map<String,Serializable> credentials) throws SLoginException
AuthenticationConstants.BASIC_USERNAME keycredentials - the credentials to checkSLoginException - if username is absent, blank or if credentials is nullpublic void logout(long sessionId)
throws SSessionNotFoundException
logout in interface LoginServiceSSessionNotFoundExceptionpublic boolean isValid(long sessionId)
isValid in interface LoginServiceprotected TechnicalUser getTechnicalUser(long tenantId) throws SLoginException
SLoginExceptionprotected void debugLog(String message)
Copyright © 2018 Bonitasoft S.A.. All rights reserved.