Skip to content

Documentation for ServletBearerExchangeFilterFunction incomplete or incorrect #15425

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

Closed
jpmsilva opened this issue Jul 15, 2024 · 1 comment
Closed
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
Milestone

Comments

@jpmsilva
Copy link
Contributor

jpmsilva commented Jul 15, 2024

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).

@jzheaux
Copy link
Contributor

jzheaux commented Jul 22, 2024

Thanks for the report, @jpmsilva, this is now merged into 5.8.x, 6.2.x, 6.3.x, and main and will go out in the next set of maintenance releases.

@jzheaux jzheaux added in: docs An issue in Documentation or samples and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 22, 2024
@jzheaux jzheaux self-assigned this Jul 22, 2024
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed in: docs An issue in Documentation or samples labels Jul 22, 2024
@jzheaux jzheaux added this to the 5.8.14 milestone Jul 22, 2024
@jzheaux jzheaux removed the type: bug A general bug label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
Projects
None yet
Development

No branches or pull requests

2 participants