-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Documentation for ServletBearerExchangeFilterFunction is incomplete or incorrect, as it mentions this regarding locating a bearer token:
To locate the bearer token, this looks in the Reactor Context for a key of type Authentication. Registering , as a @bean will take care of this automatically
It does not specify what to register exactly.
Looking at the source code we see:
Registering {@see org.springframework.security.config.annotation.web.configuration.OAuth2ResourceServerConfiguration.OAuth2ResourceServerWebFluxSecurityConfiguration.BearerRequestContextSubscriberRegistrar}, as a {@code @bean} will take care of this automatically
The class mentioned does not appear to exist, which explains why the Javadoc appears incomplete, and as an API user it is unclear what needs to be done for ServletBearerExchangeFilterFunction to work as expected.
(Edited to remove some remarks that turned out to be unrelated - this appears to be simply a documentation issue).