-
Notifications
You must be signed in to change notification settings - Fork 6k
Add CsrfTokenRepository.loadDeferredToken #11924
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
Conversation
web/src/main/java/org/springframework/security/web/csrf/CsrfTokenRepository.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/csrf/CsrfFilter.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/csrf/DeferredCsrfToken.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've provided feedback inline.
Additionally, I'm curious how this fits into the big picture of the breach protection
web/src/main/java/org/springframework/security/web/csrf/CsrfFilter.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/csrf/CsrfTokenRepository.java
Outdated
Show resolved
Hide resolved
Thanks for the feedback, @rwinch!
The goal was to make a simpler API for customizing the request handling. The alternative we discussed would be to add a post-processor inside the With the change in this PR, support for breach fits back into the paradigm of a separate implementation of |
9a99987
to
fe61b7c
Compare
Thanks @rwinch. I've updated the PR based on your feedback. |
* Move DeferredCsrfToken to top-level and implement Supplier<CsrfToken> * Move RepositoryDeferredCsrfToken to top-level and make package-private * Add CsrfTokenRepository.loadToken(HttpServletRequest, HttpServletResponse) * Update CsrfFilter * Rename CsrfTokenRepositoryRequestHandler to CsrfTokenRequestAttributeHandler Issue spring-projectsgh-11892 Closes spring-projectsgh-11918
fe61b7c
to
969c848
Compare
Merged via 475b3bb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sjohnr This looks great. I think it has moved things along in a better direction than the work that I had done.
Appreciate the kind words @rwinch! Thanks for all the help, support and guidance too. |
Issue gh-11892
Closes gh-11918