Это мой раздел безопасности application.yml:
Код: Выделить всё
security:
oauth2:
client:
provider:
auth0:
authorization-uri: http://localhost:5556/auth0/auth
token-uri: http://localhost:5556/auth0/token
jwk-set-uri: http://localhost:5556/auth0/keys
registration:
auth0:
client-id: sample-app
client-secret: ZXhhbXBsZS1hcHAtc2VjcmV0
client-name: Sample App
scope: openid
authorization-grant-type: authorization_code
redirect-uri: http://localhost:8085/my-api/login/oauth2/code/auth0
Код: Выделить всё
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/login/oauth2/code/auth0").permitAll()
.anyRequest().authenticated()
.and()
.oauth2Login();
}
}
Но последующие запросы к конечным точкам не содержат никаких токенов-носителей. Разве после авторизации в заголовках не должно быть токена?
Подробнее здесь: https://stackoverflow.com/questions/789 ... login-page