Выражения Spring Security "# oauth2.xxx" теперь не работают - PullRequest
0 голосов
/ 19 марта 2020

, поскольку я перешел с Spring-Security-Oauth на Spring-Securty, я не могу решить это:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests()
            .antMatchers("/secure/me").access("#oauth2.isUser()")
            .antMatchers("/secure/**").access("#oauth2.isClient()")
            .and()
            .oauth2ResourceServer().jwt();
}

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>

Обратите внимание, что мне нужно различать, когда пользовательский токен или токен client_credentials. Я вижу, что #oauth2.xxx не найдено. У кого-то был такой же случай? Как вам удалось решить это? Спасибо ...

...