@Deprecated @Component(value="cuba_LoginService") public class LoginServiceBean extends java.lang.Object implements LoginService
NAME
Constructor and Description |
---|
LoginServiceBean()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkRememberMe(java.lang.String login,
java.lang.String rememberMeToken)
Deprecated.
Check if remember me token exists in db.
|
int |
getBruteForceBlockIntervalSec()
Deprecated.
|
UserSession |
getSession(java.util.UUID sessionId)
Deprecated.
Get a UserSession from the cache of currently active sessions.
|
UserSession |
getSystemSession(java.lang.String trustedClientPassword)
Deprecated.
Get system user session from a trusted client.
|
boolean |
isBruteForceProtectionEnabled()
Deprecated.
|
UserSession |
login(java.lang.String login,
java.lang.String password,
java.util.Locale locale)
Deprecated.
Log in using login and user's password.
|
UserSession |
login(java.lang.String login,
java.lang.String password,
java.util.Locale locale,
java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Login using user name and password
|
int |
loginAttemptsLeft(java.lang.String login,
java.lang.String ipAddress)
Deprecated.
Returns a number of login attempts left for the specified pair of login and IP-address
|
UserSession |
loginByRememberMe(java.lang.String login,
java.lang.String rememberMeToken,
java.util.Locale locale)
Deprecated.
Login using user name and remember me token
|
UserSession |
loginByRememberMe(java.lang.String login,
java.lang.String rememberMeToken,
java.util.Locale locale,
java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Login using user name and remember me token
|
UserSession |
loginTrusted(java.lang.String login,
java.lang.String password,
java.util.Locale locale)
Deprecated.
Log in from a trusted client.
|
UserSession |
loginTrusted(java.lang.String login,
java.lang.String password,
java.util.Locale locale,
java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Login using user name and trusted password
|
void |
logout()
Deprecated.
Log out and destroy an active user session.
|
int |
registerUnsuccessfulLogin(java.lang.String login,
java.lang.String ipAddress)
Deprecated.
Registers unsuccessful login attempt
|
UserSession |
substituteUser(User substitutedUser)
Deprecated.
Substitute a user, obtaining all its security related environment.
|
public UserSession login(java.lang.String login, java.lang.String password, java.util.Locale locale) throws LoginException
LoginService
login
in interface LoginService
login
- loginpassword
- user's encrypted passwordlocale
- client localeLoginException
- in case of unsuccessful log inpublic UserSession login(java.lang.String login, java.lang.String password, java.util.Locale locale, java.util.Map<java.lang.String,java.lang.Object> params) throws LoginException
LoginService
login
in interface LoginService
login
- login namepassword
- encrypted passwordlocale
- client localeparams
- map of login parameters. Supported parameters are:
LoginException
- in case of unsuccessful loginpublic UserSession loginTrusted(java.lang.String login, java.lang.String password, java.util.Locale locale) throws LoginException
LoginService
loginTrusted
in interface LoginService
login
- loginpassword
- client's encrypted trusted passwordlocale
- client localeLoginException
- in case of unsuccessful log inpublic UserSession loginTrusted(java.lang.String login, java.lang.String password, java.util.Locale locale, java.util.Map<java.lang.String,java.lang.Object> params) throws LoginException
LoginService
loginTrusted
in interface LoginService
login
- login namepassword
- client's encrypted trusted passwordlocale
- client localeparams
- login paramsLoginException
- in case of unsuccessful loginpublic UserSession loginByRememberMe(java.lang.String login, java.lang.String rememberMeToken, java.util.Locale locale) throws LoginException
LoginService
loginByRememberMe
in interface LoginService
login
- login namerememberMeToken
- client's remember me tokenlocale
- client localeLoginException
- in case of unsuccessful loginpublic UserSession loginByRememberMe(java.lang.String login, java.lang.String rememberMeToken, java.util.Locale locale, java.util.Map<java.lang.String,java.lang.Object> params) throws LoginException
LoginService
loginByRememberMe
in interface LoginService
login
- login namerememberMeToken
- client's remember me tokenlocale
- client localeparams
- login paramsLoginException
- in case of unsuccessful loginpublic UserSession getSystemSession(java.lang.String trustedClientPassword) throws LoginException
LoginService
LoginService.logout()
for obtained user session. It is cached on middleware for multiple clients. getSystemSession
in interface LoginService
trustedClientPassword
- trusted client passwordLoginException
- in case of unsuccessful loginpublic void logout()
LoginService
logout
in interface LoginService
public UserSession substituteUser(User substitutedUser)
LoginService
substituteUser
in interface LoginService
substitutedUser
- a user to substitute. Must be in the current users' User.substitutions
list.public UserSession getSession(java.util.UUID sessionId)
LoginService
getSession
in interface LoginService
sessionId
- the session idpublic boolean checkRememberMe(java.lang.String login, java.lang.String rememberMeToken)
LoginService
checkRememberMe
in interface LoginService
login
- user loginrememberMeToken
- remember me tokenpublic boolean isBruteForceProtectionEnabled()
isBruteForceProtectionEnabled
in interface LoginService
public int getBruteForceBlockIntervalSec()
getBruteForceBlockIntervalSec
in interface LoginService
public int loginAttemptsLeft(java.lang.String login, java.lang.String ipAddress)
LoginService
loginAttemptsLeft
in interface LoginService
login
- user loginipAddress
- user IP-addresspublic int registerUnsuccessfulLogin(java.lang.String login, java.lang.String ipAddress)
LoginService
registerUnsuccessfulLogin
in interface LoginService
login
- user loginipAddress
- user IP-address