Skip to content
Snippets Groups Projects
Commit 6b1251a1 authored by Ludovic Claude's avatar Ludovic Claude
Browse files

Hard-code location of the login endpoint for HBP

parent 8db89e02
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,8 @@ import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.security.Principal;
// See https://spring.io/guides/tutorials/spring-boot-oauth2/ for reference about configuring OAuth2 login
/**
* Configuration for security.
*/
......@@ -124,7 +126,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
}
private Filter ssoFilter() {
OAuth2ClientAuthenticationProcessingFilter hbpFilter = new OAuth2ClientAuthenticationProcessingFilter(loginUrl);
OAuth2ClientAuthenticationProcessingFilter hbpFilter = new OAuth2ClientAuthenticationProcessingFilter("/login/hbp");
OAuth2RestTemplate hbpTemplate = new OAuth2RestTemplate(hbp(), oauth2ClientContext);
hbpFilter.setAuthenticationSuccessHandler(new SimpleUrlAuthenticationSuccessHandler(frontendRedirectAfterLogin));
hbpFilter.setRestTemplate(hbpTemplate);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment