From 7a7888bd59f6cd26dbffed1feafaea382ccfbc01 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Wed, 1 Feb 2017 17:19:51 +0000 Subject: [PATCH] added extensio to support oAuth2 requesting applications with error handling git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/liferay62-plugins/login-hook@142018 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../html/portlet/login/RequestingApplication.jsp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/RequestingApplication.jsp b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/RequestingApplication.jsp index 149acd4..c48b12e 100644 --- a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/RequestingApplication.jsp +++ b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/RequestingApplication.jsp @@ -16,14 +16,24 @@
<% - hideCreateAccountAndForgotPassword = true; + Map queryMap = AuthUtil.getQueryMap(redirect); if (!queryMap.isEmpty()) { String clientId = queryMap.get(GET_CLIENT_ID_PARAMETER); + if (clientId == null || clientId.compareTo("")==0) { + clientNotAuthorised = true;%> +

We're sorry your application is not authorised by + D4Science

+

+ The client_id does not exist or something occurred in retrieving it + from the Information System: (<%=clientId%>) +

+ <%} String scope = queryMap.get(GET_SCOPE_PARAMETER); if (clientId != null && clientId.compareTo("") != 0) { RequestingApp app = AuthUtil.getAuthorisedApplicationInfoFromIs(clientId); if (app != null) { + hideCreateAccountAndForgotPassword = true; if (app.getLogoURL() != null && !app.getLogoURL().isEmpty()) { %>

@@ -58,7 +68,7 @@ D4Science

The client_id does not exist or something occurred in retrieving it - from the Information System: " (<%=clientId%>) + from the Information System: (<%=clientId%>)

<% clientNotAuthorised = true;