Skip to content

JwtGrantedAuthoritiesConverter should allow configuring the authority prefix #7101

Closed
@jzheaux

Description

@jzheaux

Related to #6945 and #7100

It would be nice to configure JwtGrantedAuthoritiesConverter with what scope prefix to use for the resulting GrantedAuthoritys:

JwtGrantedAuthoritiesConverter converter = new JwtGrantedAuthoritiesConverter();
converter.setAuthorityPrefix("ROLE_");

This would involve adding a new method to JwtGrantedAuthoritiesConverter, namely setAuthorityPrefix. The code would then use this prefix instead of the hardcoded "SCOPE_" prefix.

The default value should still be "SCOPE_".

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions