0

As spring-security-oauth2 obsoleted, see EOL for Spring Security OAuth, I cannot use #oauth2.hasScope([scope]) in XML config provided by OAuth2SecurityExpressionMethods.java.

Expected to see AST parser or similar handler in either spring-security-oauth2-jose, spring-security-oauth2-client, spring-security-oauth2-core to accomplish that in the following example, #oauth2 security expressions on method level.

Is there something I missed for XML config for OAuth2 scope checking? Or I must implement it by hasAuthority('SCOPE_[scope]')?

dur
  • 15,689
  • 25
  • 79
  • 125
John
  • 1

1 Answers1

0

I have to switch to hasAuthority("SCOPE_scope").

Spring Security converts scopes that follow the granted authority naming convention`, see OAuth 2.0 Migration Guide

dur
  • 15,689
  • 25
  • 79
  • 125
John
  • 1