The 3rd party Oauth2 resources server that I am required to use returns the scopes in the JWT token with a prefix of scp as in "scp": "read_notifications.v1". When spring security parses the JWT it returns an empty set of scopes.
Does anyone know of a way to customize the parsing of the token to include scp as an alias for scope
Yes I know ways to customize the parsing of tokens.
With Spring Boot Starters of mine
Sample for a reactive OAuth2 client
With
com.c4-soft.springaddons.security.issuers[].authorities[]properties, you can configure an auto-wired authorities converter. Here, I just setscpas source for Spring Authorities, but you can also define a prefix (something likeROLE_orSCOPE_) and force to upper or lower case.Browse the samples and tutorials for different use cases (servlets, resource servers, ...)
With Spring Boot "official" starters
The manual answers your question for: