public interface UserLockoutService
Modifier and Type | Method and Description |
---|---|
boolean |
canResetPassword(User user)
Return true if this user can reset their password.
|
void |
createLoginAttempt(String username,
String loginAttemptResult,
String clientId)
Create a user login attempt
|
void |
createLoginAttempt(User user,
String loginAttemptResult)
Create a user login attempt.
|
User |
lockUser(User user)
Manually lock a user
|
User |
unlockUser(User user)
Manually unlock a user
|
Optional<User> |
unlockUserIfEligible(String username,
String clientId)
If a user is eligbile for unlocking, unlock them.
|
Boolean |
unlockUserOnPasswordResetIfEligible(User user)
After a password reset, unlock the user if they're eligible.
|
void createLoginAttempt(User user, String loginAttemptResult)
user
- The user to create a login attempt forloginAttemptResult
- The login attempt result.org.springframework.security.authentication.LockedException
- if the user is locked outvoid createLoginAttempt(String username, String loginAttemptResult, String clientId)
username
- The username to create an attempt forloginAttemptResult
- The login attempt resultclientId
- The client IDOptional<User> unlockUserIfEligible(String username, String clientId)
username
- The usernameclientId
- The client IDboolean canResetPassword(User user)
See AuthorizationServer.getLockedUserCanResetPassword()
and
UserLockoutProperties.isLockedUserCanResetPassword()
user
- The user to check@Nullable Boolean unlockUserOnPasswordResetIfEligible(User user)
See AuthorizationServer.getResetPasswordUnlocksUser()
and
UserLockoutProperties.isResetPasswordUnlocksUser()
user
- The user to unlock, if eligibleCopyright © 2021. All rights reserved.