Package com.atlassian.bamboo.user
Class LoginInformationManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.user.LoginInformationManagerImpl
-
- All Implemented Interfaces:
LoginInformationManager
public class LoginInformationManagerImpl extends Object implements LoginInformationManager
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.user.LoginInformationManager
BEAN_ID
-
-
Constructor Summary
Constructors Constructor Description LoginInformationManagerImpl(@NotNull LoginInformationDao loginInformationDao, @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFailedLoginAttemptsCount(@Nullable String userName)
Get number of failed login attempts for userboolean
incrementFailedCountAndCheckThreshold(@NotNull String userName)
Returns true when CAPTCHA would be required the next time this user authenticates.boolean
isElevatedSecurityCheckRequired(String userName)
Returns true when CAPTCHA is required for this user.void
resetFailedLoginAttemptsCount(@Nullable String userName)
Reset number of failed login attempts for user.
-
-
-
Constructor Detail
-
LoginInformationManagerImpl
public LoginInformationManagerImpl(@NotNull @NotNull LoginInformationDao loginInformationDao, @NotNull @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Detail
-
isElevatedSecurityCheckRequired
public boolean isElevatedSecurityCheckRequired(String userName)
Description copied from interface:LoginInformationManager
Returns true when CAPTCHA is required for this user.- Specified by:
isElevatedSecurityCheckRequired
in interfaceLoginInformationManager
- Returns:
- true when CAPTCHA is required for this user.
-
incrementFailedCountAndCheckThreshold
public boolean incrementFailedCountAndCheckThreshold(@NotNull @NotNull String userName) throws IllegalArgumentException
Description copied from interface:LoginInformationManager
Returns true when CAPTCHA would be required the next time this user authenticates.- Specified by:
incrementFailedCountAndCheckThreshold
in interfaceLoginInformationManager
- Returns:
- true when CAPTCHA would be required the next time this user authenticates.
- Throws:
IllegalArgumentException
- when unable save login attempt to DB
-
getFailedLoginAttemptsCount
public int getFailedLoginAttemptsCount(@Nullable @Nullable String userName)
Description copied from interface:LoginInformationManager
Get number of failed login attempts for user- Specified by:
getFailedLoginAttemptsCount
in interfaceLoginInformationManager
- Returns:
-
resetFailedLoginAttemptsCount
public void resetFailedLoginAttemptsCount(@Nullable @Nullable String userName) throws IllegalArgumentException
Description copied from interface:LoginInformationManager
Reset number of failed login attempts for user.- Specified by:
resetFailedLoginAttemptsCount
in interfaceLoginInformationManager
- Throws:
IllegalArgumentException
- when unable save login attempt to DB
-
-