Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds configuration options to
.passwordManagement
to allow for additional password management flows:You can activate by publishing a
UserDetailsPasswordManager
bean and using the PasswordManagement DSL:Since these flows require a
UserDetailsPasswordManager
bean, and because.passwordManagement
is a pre-existing DSL, they remain inactive until that bean is provided.Some things to try:
ChangePasswordAdvisor
- the PR contains several sample implementations of this interface. They can be composed inDelegatingChangePasswordAdvisor
to form a custom set of password requirements. By default, two advisors are active; the compromised password advisor and the password advice advisor checking for any existing adviceChangePasswordAdvice.Action
- the existing advisors can be configured to have a different action, for example changing the failure action toAction.MUST_CHANGE
instead ofAction.SHOULD_CHANGE
UserDetailsPasswordManager
contains any advice tied to a user. By default,.passwordManagement
only checks at login time and when a password changes. However, you can write aChangePasswordAdviceRepository
implementation that checks theUserDetailsPasswordManager
on each request so that the user is advised mid-session if changes are needed.