-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: coreAn issue in spring-security-coreAn issue in spring-security-corestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: jiraAn issue that was migrated from JIRAAn issue that was migrated from JIRA
Description
Paul Benedict (Migrated from SEC-1783) said:
I need to record the number of password failures for existing users. DaoAuthenticationProvider#additionalAuthenticationChecks() is where I could do this, except BadCredentialsException is thrown for both (log messages) "no credentials provided" and "password does not match stored value". There's no way to distinguish the two at runtime. There's some refactoring here that could be done. Here are my suggestions:
- Subclass BadCredentialsException with new NoCredentialsException and InvalidCredentialsException
- Move the call to PasswordEncoder#isPasswordValid() to a new isPasswordValid() method whose default is to call the password encoder.
Of the two choices, I prefer #1
Metadata
Metadata
Assignees
Labels
in: coreAn issue in spring-security-coreAn issue in spring-security-corestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: jiraAn issue that was migrated from JIRAAn issue that was migrated from JIRA