|
@@ -60,7 +60,7 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login {
|
|
oauth2Login {
|
|
authenticationConverter = authenticationConverter()
|
|
authenticationConverter = authenticationConverter()
|
|
authenticationMatcher = authenticationMatcher()
|
|
authenticationMatcher = authenticationMatcher()
|
|
@@ -75,8 +75,6 @@ class OAuth2LoginSecurityConfig {
|
|
securityContextRepository = securityContextRepository()
|
|
securityContextRepository = securityContextRepository()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
----
|
|
----
|
|
@@ -158,7 +156,7 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
exceptionHandling {
|
|
exceptionHandling {
|
|
authenticationEntryPoint = RedirectServerAuthenticationEntryPoint("/login/oauth2")
|
|
authenticationEntryPoint = RedirectServerAuthenticationEntryPoint("/login/oauth2")
|
|
}
|
|
}
|
|
@@ -166,8 +164,6 @@ class OAuth2LoginSecurityConfig {
|
|
authorizationRequestResolver = authorizationRequestResolver()
|
|
authorizationRequestResolver = authorizationRequestResolver()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private fun authorizationRequestResolver(): ServerOAuth2AuthorizationRequestResolver {
|
|
private fun authorizationRequestResolver(): ServerOAuth2AuthorizationRequestResolver {
|
|
@@ -243,13 +239,11 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login {
|
|
oauth2Login {
|
|
authenticationMatcher = PathPatternParserServerWebExchangeMatcher("/login/oauth2/callback/{registrationId}")
|
|
authenticationMatcher = PathPatternParserServerWebExchangeMatcher("/login/oauth2/callback/{registrationId}")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
----
|
|
----
|
|
@@ -369,11 +363,9 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login { }
|
|
oauth2Login { }
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@@ -458,11 +450,9 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login { }
|
|
oauth2Login { }
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@@ -536,11 +526,9 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login { }
|
|
oauth2Login { }
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@@ -594,11 +582,9 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
oauth2Login { }
|
|
oauth2Login { }
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@@ -730,7 +716,7 @@ class OAuth2LoginSecurityConfig {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
|
|
- http {
|
|
|
|
|
|
+ return http {
|
|
authorizeExchange {
|
|
authorizeExchange {
|
|
authorize(anyExchange, authenticated)
|
|
authorize(anyExchange, authenticated)
|
|
}
|
|
}
|
|
@@ -739,8 +725,6 @@ class OAuth2LoginSecurityConfig {
|
|
logoutSuccessHandler = oidcLogoutSuccessHandler()
|
|
logoutSuccessHandler = oidcLogoutSuccessHandler()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- return http.build()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private fun oidcLogoutSuccessHandler(): ServerLogoutSuccessHandler {
|
|
private fun oidcLogoutSuccessHandler(): ServerLogoutSuccessHandler {
|