@Component(value="cuba_TrustedClientService") public class TrustedClientServiceBean extends java.lang.Object implements TrustedClientService
| Modifier and Type | Field and Description |
|---|---|
protected AnonymousSessionHolder |
anonymousSessionHolder |
protected Authentication |
authentication |
protected Messages |
messages |
protected static java.lang.String |
MSG_PACK |
protected ServerConfig |
serverConfig |
protected TrustedLoginHandler |
trustedLoginHandler |
protected UserSessionsAPI |
userSessions |
NAME| Constructor and Description |
|---|
TrustedClientServiceBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTrustedClientCredentials(java.lang.String trustedClientPassword) |
UserSession |
findSession(java.lang.String trustedClientPassword,
java.util.UUID sessionId)
Get a UserSession from the cache of currently active sessions.
|
UserSession |
getAnonymousSession(java.lang.String trustedClientPassword)
Get anonymous user session from a trusted client.
|
UserSession |
getAnonymousSession(java.lang.String trustedClientPassword,
java.lang.String securityScope)
Get anonymous user session from a trusted client.
|
protected java.lang.String |
getInvalidCredentialsMessage(java.lang.String login,
java.util.Locale locale) |
UserSession |
getSystemSession(java.lang.String trustedClientPassword)
Get system user session from a trusted client.
|
void |
healthCheck()
Do nothing.
|
protected static final java.lang.String MSG_PACK
@Inject protected TrustedLoginHandler trustedLoginHandler
@Inject protected ServerConfig serverConfig
@Inject protected Messages messages
@Inject protected Authentication authentication
@Inject protected UserSessionsAPI userSessions
@Inject protected AnonymousSessionHolder anonymousSessionHolder
@Nonnull public UserSession getSystemSession(java.lang.String trustedClientPassword) throws LoginException
TrustedClientServiceAuthenticationService.logout() for obtained user session.
It is cached on middleware for multiple clients. getSystemSession in interface TrustedClientServicetrustedClientPassword - trusted client passwordLoginException - if passed invalid trusted client password@Nonnull public UserSession getAnonymousSession(java.lang.String trustedClientPassword) throws LoginException
TrustedClientService
Method works like the TrustedClientService.getAnonymousSession(String, String) using the default scope name.
getAnonymousSession in interface TrustedClientServicetrustedClientPassword - trusted client passwordLoginException - if passed invalid trusted client password@Nonnull public UserSession getAnonymousSession(java.lang.String trustedClientPassword, java.lang.String securityScope) throws LoginException
TrustedClientServicegetAnonymousSession in interface TrustedClientServicetrustedClientPassword - trusted client passwordsecurityScope - security scope nameLoginException - if passed invalid trusted client password@Nullable public UserSession findSession(java.lang.String trustedClientPassword, java.util.UUID sessionId) throws LoginException
TrustedClientServicefindSession in interface TrustedClientServicetrustedClientPassword - trusted client passwordsessionId - session idLoginException - if passed invalid trusted client passwordprotected java.lang.String getInvalidCredentialsMessage(java.lang.String login,
java.util.Locale locale)
protected void checkTrustedClientCredentials(java.lang.String trustedClientPassword)
throws LoginException
LoginExceptionpublic void healthCheck()
TrustedClientServicehealthCheck in interface TrustedClientService