Skip to content

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

Closed
@pluttrell

Description

@pluttrell

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.

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions