Spring boot 做Okta+;AAD Oauth系列
我有一个springboot应用程序,我有一个要求,要求我以串行顺序使用Okta和AAD Oauth对用户进行身份验证 也就是说,用户将首先看到Okta SSO流,然后是AAD Oauth流 如何使用spring安全性实现这一点 目前,我的springboot应用程序仅支持使用以下配置的AAD Oauth流:Spring boot 做Okta+;AAD Oauth系列,spring-boot,spring-security,oauth-2.0,okta,Spring Boot,Spring Security,Oauth 2.0,Okta,我有一个springboot应用程序,我有一个要求,要求我以串行顺序使用Okta和AAD Oauth对用户进行身份验证 也就是说,用户将首先看到Okta SSO流,然后是AAD Oauth流 如何使用spring安全性实现这一点 目前,我的springboot应用程序仅支持使用以下配置的AAD Oauth流: http .cors() .and() .csrf() .disable() .logout()
http
.cors()
.and()
.csrf()
.disable()
.logout()
.logoutUrl("/api/auth/logout")
.invalidateHttpSession(true)
.deleteCookies("JSESSIONID", "SESSION")
.and()
.addFilterBefore(_dualAuthFilter, OAuth2AuthorizationRequestRedirectFilter.class)
.addFilterAfter(_queryModifierFilter, DualAuthFilter.class)
.authorizeRequests()
.antMatchers("/api/auth*").permitAll()
.and()
.authorizeRequests()
.antMatchers("/api/v*").authenticated()
.and()
.authorizeRequests()
.anyRequest().authenticated()
.and()
.oauth2Login()
.authorizationEndpoint()
.baseUri(_oAuthConfig.getAuthEndpointBaseUri())
.and()
.tokenEndpoint()
.accessTokenResponseClient(this.aadAccessTokenResponseClient());
我在考虑创建一个过滤器并在其中实现整个流程。但我认为我必须手动完成整个流程,而不能使用SpringSecurity的内置工具
我如何才能最好地实现这一点