首先,根据Springdoc,如果我想将用户角色映射到范围,我应该使用setCheckUserScopes(true)到DefaultOAuth2RequestFactory。因此,一种方法是注入(inject)我自己的DefaultOAuth2RequestFactorybean,正如文档所说:TheAuthorizationServerEndpointsConfigurerallowsyoutoinjectacustomOAuth2RequestFactorysoyoucanusethatfeaturetosetupafactoryifyouuse@EnableAuthorizat
首先,根据Springdoc,如果我想将用户角色映射到范围,我应该使用setCheckUserScopes(true)到DefaultOAuth2RequestFactory。因此,一种方法是注入(inject)我自己的DefaultOAuth2RequestFactorybean,正如文档所说:TheAuthorizationServerEndpointsConfigurerallowsyoutoinjectacustomOAuth2RequestFactorysoyoucanusethatfeaturetosetupafactoryifyouuse@EnableAuthorizat