Add redirect url from property
This commit is contained in:
parent
55712350b0
commit
6c1c9144c2
|
@ -1,5 +1,8 @@
|
|||
package eu.dnetlib.openaire.usermanagement.utils;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
|
@ -7,6 +10,11 @@ import javax.servlet.http.HttpServletRequest;
|
|||
*/
|
||||
public class UrlConstructor {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(UrlConstructor.class);
|
||||
|
||||
@Value("${oidc.home}")
|
||||
private static String oidcHomeUrl;
|
||||
|
||||
public static String getRedirectUrl(HttpServletRequest request, String jspPage) {
|
||||
|
||||
String scheme = request.getScheme();
|
||||
|
@ -40,6 +48,14 @@ public class UrlConstructor {
|
|||
request.getSession().setAttribute("emailSuccess", "true");
|
||||
}
|
||||
|
||||
request.getSession().setAttribute("homeUrl", oidcHomeUrl);
|
||||
|
||||
logger.info("home Url" + oidcHomeUrl);
|
||||
return resultPath;
|
||||
}
|
||||
|
||||
|
||||
// public static void redirectToHome(HttpServletRequest request){
|
||||
// request.getSession().setAttribute("redirectHomeUrl", oidcHomeUrl);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
log4j.rootLogger = DEBUG, R
|
||||
log4j.rootLogger = INFO, R
|
||||
|
||||
log4j.logger.eu.dnetlib = DEBUG
|
||||
log4j.logger.eu.dnetlib = INFO
|
||||
log4j.logger.org.mitre.openid = INFO
|
||||
log4j.logger.org.springframework = INFO, S
|
||||
|
||||
|
|
|
@ -242,7 +242,6 @@
|
|||
-->
|
||||
<bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" />
|
||||
|
||||
|
||||
<context:component-scan base-package="eu.dnetlib.openaire.user.api.services" />
|
||||
<context:component-scan base-package="eu.dnetlib.openaire.usermanagement.registry.beans" />
|
||||
<context:annotation-config></context:annotation-config>
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
session.removeAttribute("success");
|
||||
}
|
||||
%>
|
||||
<META HTTP-EQUIV=Refresh CONTENT="0.5; URL=http://beta.services.openaire.eu/uoa-user-management/openid_connect_login">
|
||||
<%--<META HTTP-EQUIV=Refresh CONTENT="0.5; URL=http://beta.services.openaire.eu/uoa-user-management/openid_connect_login">--%>
|
||||
|
||||
<META HTTP-EQUIV=Refresh CONTENT="0.5; URL=${session.getAttribute("homeUrl")}>
|
||||
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
|
Loading…
Reference in New Issue