Skip to content

Commit fb64088

Browse files
committed
Fix #28624: redirect to main page after login
1 parent 4e62de9 commit fb64088

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/eu/openanalytics/containerproxy/auth/impl/OpenIDAuthenticationBackend.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public void configureHttpSecurity(HttpSecurity http, AuthorizedUrl anyRequestCon
105105
http
106106
.oauth2Login()
107107
.loginPage("/login")
108+
.defaultSuccessUrl("/", true)
108109
.clientRegistrationRepository(clientRegistrationRepo)
109110
.authorizedClientRepository(oAuth2AuthorizedClientRepository)
110111
.authorizationEndpoint()

src/main/java/eu/openanalytics/containerproxy/security/WebSecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public void handle(HttpServletRequest request, HttpServletResponse response, Acc
175175
http
176176
.formLogin()
177177
.loginPage("/login")
178+
.successForwardUrl("/")
178179
.and()
179180
.logout()
180181
.logoutUrl(auth.getLogoutURL())
@@ -218,4 +219,4 @@ public AuthenticationManager authenticationManagerBean() throws Exception {
218219
return super.authenticationManagerBean();
219220
}
220221

221-
}
222+
}

0 commit comments

Comments
 (0)