![](/img/trans.png)
[英]OAuth2 JWT Authorization - Issue With Spring Security XML Configuration #oauth2.hasScope
[英]spring security oauth2 hasScope xml method security upgrade to what?
作為spring-security-oauth2
obsoleted ref: EOL for Spring Security OAuth ,
不能在 OAuth2SecurityExpressionMethods.java 提供的xml配置中使用#oauth2.hasScope([scope])
期望在spring-security-oauth2-jose
、 spring-security-oauth2-client
、 spring-security-oauth2-core
中看到 ast 解析器或類似處理程序,以在以下示例#oauth2 security expressions on method level中完成。
對於 oauth2 scope 檢查的 xml 配置,我錯過了什么嗎?
或者我必須通過hasAuthority('SCOPE_[scope]')
來實現它
謝謝
必須切換到 hasAuthority("SCOPE_scope")
Spring Security converts scopes that follow the granted authority naming convention
參考: OAuth 2.0 遷移指南
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.