Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Authentication#setAuthenticated #16668

Open
3 tasks
Tracked by #8323
jzheaux opened this issue Feb 26, 2025 · 0 comments
Open
3 tasks
Tracked by #8323

Deprecate Authentication#setAuthenticated #16668

jzheaux opened this issue Feb 26, 2025 · 0 comments
Labels
type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Feb 26, 2025

Authentication#setAuthenticated is not used by Spring Security other than inside of the constructors of Authentication implementations. Further, it's not a great look for an otherwise immutable authentication state to have it's validity be publicly mutable.

For this ticket:

  • Mark Authentication#setAuthenticated as @Deprecated.
  • Add to the JavaDoc, indicating what folks should do (implement isAuthenticated instead)
  • Add to the migration doc instructions to stop using Authentication#setAuthenticated

Existing implementations will need to still call it in order to remain passive, so they should not change in this ticket. That will be in when setAuthenticated is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant