-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: docsAn issue in Documentation or samplesAn issue in Documentation or samplestype: enhancementA general enhancementA general enhancement
Milestone
Description
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 samplesAn issue in Documentation or samplestype: enhancementA general enhancementA general enhancement