@Component(value="cuba_Connection") @Scope(value="prototype") public class DefaultConnection extends AbstractConnection implements ExternallyAuthenticatedConnection
Connection
implementation for web-client.Connection.SessionMode, Connection.UserSessionInitEvent
EXTERNAL_AUTH_USER_SESSION_ATTRIBUTE
NAME
Constructor and Description |
---|
DefaultConnection() |
Modifier and Type | Method and Description |
---|---|
void |
login(java.lang.String login,
java.lang.String password,
java.util.Locale locale)
Log in to the system.
|
void |
loginAfterExternalAuthentication(java.lang.String login,
java.util.Locale locale)
Log in to the system after external authentication.
|
void |
loginAnonymous(java.util.Locale locale)
Log in to the system.
|
void |
loginByRememberMe(java.lang.String login,
java.lang.String rememberMeToken,
java.util.Locale locale)
Log in to the system.
|
java.lang.String |
logoutExternalAuthentication()
Logout from external authentication.
|
addConnectionListener, addSubstitutionListener, getSession, isAlive, isAuthenticated, isConnected, logout, removeConnectionListener, removeSubstitutionListener, substituteUser, update, update
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkRememberMe
public void login(java.lang.String login, java.lang.String password, java.util.Locale locale) throws LoginException
Connection
login
in interface Connection
login
- user login namepassword
- encrypted user passwordlocale
- user localeLoginException
- in case of unsuccessful login due to wrong credentials or other issuespublic void loginAnonymous(java.util.Locale locale) throws LoginException
Connection
loginAnonymous
in interface Connection
locale
- user localeLoginException
- in case of unsuccessful login due to wrong credentials or other issuespublic void loginByRememberMe(java.lang.String login, java.lang.String rememberMeToken, java.util.Locale locale) throws LoginException
Connection
loginByRememberMe
in interface Connection
login
- user login namerememberMeToken
- remember me tokenlocale
- user localeLoginException
- in case of unsuccessful login due to wrong credentials or other issuespublic void loginAfterExternalAuthentication(java.lang.String login, java.util.Locale locale) throws LoginException
ExternallyAuthenticatedConnection
loginAfterExternalAuthentication
in interface ExternallyAuthenticatedConnection
login
- user login namelocale
- user localeLoginException
- in case of unsuccessful login due to wrong credentials or other issuespublic java.lang.String logoutExternalAuthentication()
ExternallyAuthenticatedConnection
logoutExternalAuthentication
in interface ExternallyAuthenticatedConnection