Expected Behavior
Possibility to replace OAuth2LoginAuthenticationWebFilter with a custom-made AuthenticationWebFilter for oauth2Login
Current Behavior
I don't find any way to replace OAuth2LoginAuthenticationWebFilter with a custom filter
Context
I'm using Spring Cloud Gateway + Spring Security OAuth2, and I need to save the access token in the Security Context Holder, to pass it downstream.
To do that, my idea is to override OAuth2LoginAuthenticationWebFilter to save an OAuth2LoginAuthenticationToken and not an instance of OAuth2AuthenticationToken.
Thanks in advance!
Comment From: sjohnr
Thanks for getting in touch @CesarStef, but it feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add a minimal sample that reproduces this issue if you feel this is a genuine bug.
I'm going to close this issue. Having said that, if you can share more information about your use case, including a detailed explanation of why you need to override the filter and what you have tried that doesn't work, we can reopen this issue if it seems like a bug or needed enhancement.