63 lines
1.6 KiB
Plaintext
63 lines
1.6 KiB
Plaintext
<%--
|
|
/**
|
|
* Copyright (c) gCube Framework. All rights reserved.
|
|
*
|
|
* @Author Massimiliano Assante, CNR-ISTI Italy
|
|
*/
|
|
--%>
|
|
|
|
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
|
|
|
|
<%
|
|
if (redirect.startsWith(siteUrl + GCubePortalConstants.AUTHORIZATION_FRIENDLY_URL)) {
|
|
hideCreateAccountAndForgotPassword = true;
|
|
Map<String, String> queryMap = AuthUtil.getQueryMap(redirect);
|
|
if (!queryMap.isEmpty()) {
|
|
String clientId = queryMap.get(GET_CLIENT_ID_PARAMETER);
|
|
String scope = queryMap.get(GET_SCOPE_PARAMETER);
|
|
if (clientId != null && clientId.compareTo("") != 0) {
|
|
RequestingApp app = AuthUtil.getAuthorisedApplicationInfoFromIs(clientId);
|
|
if (app != null) {
|
|
%>
|
|
<script>
|
|
$(".portlet-title-text").text("Sign in to approve application");
|
|
</script>
|
|
<div style="text-align: center;">
|
|
<%
|
|
if (app.getLogoURL() != null && !app.getLogoURL().isEmpty()) {
|
|
%>
|
|
<p>
|
|
<img style="width: 100px;" src="<%=app.getLogoURL()%>" />
|
|
<p>
|
|
<%
|
|
}
|
|
%>
|
|
|
|
<p class="lead">
|
|
<span style="font-weight: bolder;"><%=app.getApplicationId()%></span>
|
|
would like to access some of your D4Science info: <br /> Name, photo,
|
|
email and current roles
|
|
<%
|
|
if (scope != null && scope.compareTo("") != 0) {
|
|
%>
|
|
on context: <span style="font-weight: bolder;"><%=scope%></span>
|
|
<%
|
|
}
|
|
%>
|
|
|
|
<p>
|
|
<p>By signing in with your D4Science credentials you are approving
|
|
this application's request to access your member data and interact
|
|
with D4Science on your behalf.
|
|
<p>
|
|
</div>
|
|
<%
|
|
} else {
|
|
System.out.println(
|
|
"The client_id does not exist or something occurred in retrieving it from IS: "
|
|
+ clientId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
%> |