Using scopes as roles in Spring Security OAuth2 (provider)

后端 未结 2 824
深忆病人
深忆病人 2020-12-25 13:03

Let\'s consider a fairly simple hypothetical application where users can read or write posts.

Some users can read and write articles while some others can only read

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 13:26

    You can configure your own AccessTokenConverter (mainly for JWT) and extract the claims you want from the JWT access token and generate an Authority object. Just define a Bean factory that return an AccessTokenConverter

提交回复
热议问题