我正在做Spring安全Oauth2。在客户端,我重写configure(HttpSecurity http)方法,并希望在HttpSecurity文件中使用oauth2Login()方法。我已经在spring-security-oauth2-client, spring-boot-starter-security and spring-security-oauth2中添加了pom.xml
我正在开发一个使用Spring Boot的web应用程序,使用Azure AD和OAuth2.0进行身份验证,以保护后端。我已经尝试了这里描述的@PreAuthorize注释,SpringMVC - Checking if User is already logged in via SpringSecurity?anyRequest().authenticated() .oauth2Login()