Hello Guys,
We are testing example from official documentation regarding multi tenancy
https://keycloak.gitbooks.io/securing-client-applications-
guide/content/topics/oidc/java/multi-tenancy.html
So we are getting realm name from path but at some point our request is
getting redirected to /sso/login url and as result realm name is lost,
simply because of this method
org.keycloak.adapters.springsecurity.authentication.
KeycloakAuthenticationEntryPoint#commenceLoginRedirect
protected void commenceLoginRedirect(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String contextAwareLoginUri = request.getContextPath() + loginUri;
log.debug("Redirecting to login URI {}", contextAwareLoginUri);
response.sendRedirect(contextAwareLoginUri);
}
Could you please advise how to handle such situation ? We see an option to
override commenceLoginRedirect method, but we are not sure that it is
correct way.
Thanks in advance.
Br,
Roma