在新的 Spring Security 资源服务器定义中是否有等效的 ClientDetailsS​​ervice?

问题描述

在 Spring Security OAuth(已弃用)中,您可以在定义资源服务器时指定 ClientDetailsS​​ervice。

<oauth:resource-server id="oauth2ResourceServerFilter" 
    token-services-ref="myResourcetokenServices"
    entry-point-ref="oauth2ResSvcAuthenticationEntryPoint" />

<b:bean id="myResourcetokenServices" 
      class="org.springframework.security.oauth2.provider.token.DefaultTokenServices">
    <b:property name="tokenStore" ref="myOAuth2TokenStore"/>
    <b:property name="clientDetailsService" ref="oauth2ResourceClientDetails"/>
</b:bean>

<oauth:client-details-service id="oauth2ResourceClientDetails">
    <oauth:client client-id="myClient" />
</oauth:client-details-service>

从我看到的代码可以看出,这将验证客户端 ID 并验证允许范围的列表。

在 Spring Security(OAuth2 的新实现)中有没有办法做到这一点???

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)