Skip to content

Fix unauthenitcated() and AnonymousAuthenticationToken #3818

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
Apr 19, 2016

Conversation

rwinch
Copy link
Member

@rwinch rwinch commented Apr 14, 2016

Previously if unauthenticated() experienced an AnonymousAuthenticationToken
it would not match.

This commit ensures that if the user is anonymous (not just null)
unauthenticated() works.

Fixes gh-3409

}

@Test
public void unauthenitcatedNullAuthenitcation() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo on method name

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I pushed a fix

@rwinch rwinch force-pushed the gh-3409-unauthenticated branch from 3319fd9 to d694468 Compare April 19, 2016 19:25

// @formatter:off
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

The authManager configuration is redundant?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is redundant to what?

Copy link
Contributor

@jgrandja jgrandja Apr 19, 2016

Choose a reason for hiding this comment

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

I meant redundant in the sense that the authManager configuration is not needed to pass the test

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the clarification. I pushed an update

Previously if unauthenticated() experienced an AnonymousAuthenticationToken
it would not match.

This commit ensures that if the user is anonymous (not just null)
unauthenticated() works.

Fixes spring-projectsgh-3409
@rwinch rwinch force-pushed the gh-3409-unauthenticated branch from d694468 to b2b53f7 Compare April 19, 2016 20:09
@jgrandja jgrandja merged commit b0028d4 into spring-projects:master Apr 19, 2016
@jgrandja
Copy link
Contributor

Thanks @rwinch! It is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants