public class DelayedLoginStore extends Object implements LoginStore
Modifier and Type | Field and Description |
---|---|
static String |
DELAYED_STORE_IS_DISABLED_MSG |
static java.time.Duration |
FLUSH_INTERVAL |
Constructor and Description |
---|
DelayedLoginStore(com.atlassian.core.util.Clock clock,
ApplicationProperties applicationProperties,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
com.atlassian.event.api.EventPublisher eventPublisher) |
DelayedLoginStore(com.atlassian.core.util.Clock clock,
BulkLoginStore bulkLoginStore,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
LoginInfo |
getLoginInfo(ApplicationUser user)
LoginInfo is cached locally. |
long |
getMaxAuthenticationAttemptsAllowed()
This returns the maximum failed authentications attempts that the user can perform
after which they will be asked for extra elevated security information
|
void |
onClearCache(ClearCacheEvent event) |
void |
onImportStartedEvent(ImportStartedEvent event)
This method was presented because quick import functionality doesn't restart plugin system.
|
void |
onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) |
void |
onPluginFrameworkStartedEvent(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) |
LoginInfo |
recordLoginAttempt(ApplicationUser user,
boolean authenticated)
Failed authentication is immediately delegated.
|
void |
resetFailedLoginCount(ApplicationUser user)
This can be called to reset the failed login count of a user
|
LoginInfo |
updateLastLoginTime(ApplicationUser user)
This will update the last login time for the user without resetting the elevated
security check
|
public static final java.time.Duration FLUSH_INTERVAL
public static final String DELAYED_STORE_IS_DISABLED_MSG
public DelayedLoginStore(com.atlassian.core.util.Clock clock, ApplicationProperties applicationProperties, com.atlassian.crowd.embedded.api.CrowdService crowdService, com.atlassian.event.api.EventPublisher eventPublisher)
public DelayedLoginStore(com.atlassian.core.util.Clock clock, BulkLoginStore bulkLoginStore, com.atlassian.event.api.EventPublisher eventPublisher)
public LoginInfo getLoginInfo(ApplicationUser user)
LoginInfo
is cached locally. Local changes invalidate entries so locally (i.e on this node) data is
strictly consistent. Changes between nodes are eventually consistent and are achieved via CacheBuilder.expireAfterWrite(Duration)
getLoginInfo
in interface LoginStore
user
- the user in play. This MUST not be null.LoginInfo
objectpublic LoginInfo recordLoginAttempt(ApplicationUser user, boolean authenticated)
FLUSH_INTERVAL
) are cached.recordLoginAttempt
in interface LoginStore
user
- the user in play. This MUST not be null.authenticated
- set to true if they authenticated ok or false otherwiseLoginInfo
objectpublic LoginInfo updateLastLoginTime(ApplicationUser user)
LoginStore
updateLastLoginTime
in interface LoginStore
user
- the user in play. This MUST not be null.LoginInfo
objectpublic long getMaxAuthenticationAttemptsAllowed()
LoginStore
getMaxAuthenticationAttemptsAllowed
in interface LoginStore
public void resetFailedLoginCount(ApplicationUser user)
LoginStore
resetFailedLoginCount
in interface LoginStore
user
- the user to authorise. This MUST not be null.@EventListener public void onClearCache(ClearCacheEvent event)
@EventListener public void onPluginFrameworkStartedEvent(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
@EventListener public void onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)
@EventListener public void onImportStartedEvent(ImportStartedEvent event)
event
- that triggers flush operationCopyright © 2002-2024 Atlassian. All Rights Reserved.