Skip to content

Polish Server|ServletBearerExchangeFilterFunction #7355

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

Merged
merged 2 commits into from
Sep 4, 2019

Conversation

jzheaux
Copy link
Contributor

@jzheaux jzheaux commented Sep 4, 2019

Fixes gh-7353

@jzheaux jzheaux requested a review from jgrandja September 4, 2019 20:12
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: duplicate A duplicate of another issue type: enhancement A general enhancement labels Sep 4, 2019
@jzheaux jzheaux added this to the 5.2.0.RC1 milestone Sep 4, 2019
Copy link
Contributor

@jgrandja jgrandja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jzheaux. There are a couple of minor changes needed

implements ExchangeFilterFunction {

private static final String AUTHENTICATION_ATTR_NAME = Authentication.class.getName();

private static final AnonymousAuthenticationToken ANONYMOUS_USER_TOKEN = new AnonymousAuthenticationToken("anonymous", "anonymousUser",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed please remove

public final class ServletBearerExchangeFilterFunction
implements ExchangeFilterFunction {

private static final AnonymousAuthenticationToken ANONYMOUS_USER_TOKEN = new AnonymousAuthenticationToken("anonymous", "anonymousUser",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove as it's not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used on line 91. Are you proposing a change to currentAuthentication()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes just return Mono.empty()

@jzheaux jzheaux merged commit 099d49a into spring-projects:master Sep 4, 2019
@jzheaux jzheaux deleted the gh-7353 branch September 4, 2019 21:33
@jzheaux
Copy link
Contributor Author

jzheaux commented Sep 4, 2019

Thanks again, @jgrandja, big improvement here.

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) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Servlet/Server BearerExchangeFilterFunction
2 participants