Skip to content

v5.2.0.M3 docs contain Deprecated example code #7062

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
pluttrell opened this issue Jul 2, 2019 · 4 comments
Closed

v5.2.0.M3 docs contain Deprecated example code #7062

pluttrell opened this issue Jul 2, 2019 · 4 comments
Assignees
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Milestone

Comments

@pluttrell
Copy link

Summary

The Spring Security v5.2.0.M3 docs provides the following example:

static class GrantedAuthoritiesExtractor extends JwtAuthenticationConverter {
    protected Collection<GrantedAuthority> extractAuthorities(Jwt jwt) {
        Collection<String> authorities = (Collection<String>)
                jwt.getClaims().get("mycustomclaim");

        return authorities.stream()
                .map(SimpleGrantedAuthority::new)
                .collect(Collectors.toList());
    }
}

The Collection<GrantedAuthority> extractAuthorities(Jwt jwt) method is now deprecated. From looking at the source, it appears there's a new recommended way to introduce our own custom authority logic.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 2, 2019
@jzheaux
Copy link
Contributor

jzheaux commented Jul 2, 2019

Thanks for the report, @pluttrell! Would you be interested in submitting a PR to update the docs?

@jzheaux jzheaux added in: docs An issue in Documentation or samples type: improvement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 2, 2019
@jzheaux jzheaux self-assigned this Jul 2, 2019
@jzheaux jzheaux added this to the 5.2.0.RC1 milestone Jul 2, 2019
@pluttrell
Copy link
Author

@jzheaux I was thinking about submitting one, but wasn't 100% sure what the authors intent is and didn't want to lead people in the wrong direction.

@jzheaux
Copy link
Contributor

jzheaux commented Jul 3, 2019

I see, @pluttrell, I can understand you wanting to first assess the author's intent. Yes, I think you've understood it correctly, and the documentation just lagged behind #6277.

Let me know if you'd like to provide a PR, and I'd be happy to assist.

@jzheaux jzheaux added type: enhancement A general enhancement status: waiting-for-feedback We need additional information before we can continue and removed type: improvement labels Jul 9, 2019
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jul 16, 2019
@jzheaux jzheaux added status: first-timers-only An issue that can only be worked on by brand new contributors and removed status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue labels Jul 19, 2019
@jzheaux jzheaux removed their assignment Aug 2, 2019
@jzheaux jzheaux modified the milestones: 5.2.0.M4, 5.2.0.RC1 Aug 5, 2019
@jzheaux jzheaux closed this as completed in 08f68c9 Sep 5, 2019
@jzheaux jzheaux removed the status: first-timers-only An issue that can only be worked on by brand new contributors label Sep 5, 2019
@jzheaux jzheaux self-assigned this Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants