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
This commit is contained in:
parent
21c8a9a848
commit
7a7888bd59
|
@ -16,14 +16,24 @@
|
||||||
</script>
|
</script>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<%
|
<%
|
||||||
hideCreateAccountAndForgotPassword = true;
|
|
||||||
Map<String, String> queryMap = AuthUtil.getQueryMap(redirect);
|
Map<String, String> queryMap = AuthUtil.getQueryMap(redirect);
|
||||||
if (!queryMap.isEmpty()) {
|
if (!queryMap.isEmpty()) {
|
||||||
String clientId = queryMap.get(GET_CLIENT_ID_PARAMETER);
|
String clientId = queryMap.get(GET_CLIENT_ID_PARAMETER);
|
||||||
|
if (clientId == null || clientId.compareTo("")==0) {
|
||||||
|
clientNotAuthorised = true;%>
|
||||||
|
<p class="lead">We're sorry your application is not authorised by
|
||||||
|
D4Science</p>
|
||||||
|
<p style="color: red;">
|
||||||
|
The client_id does not exist or something occurred in retrieving it
|
||||||
|
from the Information System: (<%=clientId%>)
|
||||||
|
</p>
|
||||||
|
<%}
|
||||||
String scope = queryMap.get(GET_SCOPE_PARAMETER);
|
String scope = queryMap.get(GET_SCOPE_PARAMETER);
|
||||||
if (clientId != null && clientId.compareTo("") != 0) {
|
if (clientId != null && clientId.compareTo("") != 0) {
|
||||||
RequestingApp app = AuthUtil.getAuthorisedApplicationInfoFromIs(clientId);
|
RequestingApp app = AuthUtil.getAuthorisedApplicationInfoFromIs(clientId);
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
|
hideCreateAccountAndForgotPassword = true;
|
||||||
if (app.getLogoURL() != null && !app.getLogoURL().isEmpty()) {
|
if (app.getLogoURL() != null && !app.getLogoURL().isEmpty()) {
|
||||||
%>
|
%>
|
||||||
<p>
|
<p>
|
||||||
|
@ -58,7 +68,7 @@
|
||||||
D4Science</p>
|
D4Science</p>
|
||||||
<p style="color: red;">
|
<p style="color: red;">
|
||||||
The client_id does not exist or something occurred in retrieving it
|
The client_id does not exist or something occurred in retrieving it
|
||||||
from the Information System: " (<%=clientId%>)
|
from the Information System: (<%=clientId%>)
|
||||||
</p>
|
</p>
|
||||||
<%
|
<%
|
||||||
clientNotAuthorised = true;
|
clientNotAuthorised = true;
|
||||||
|
|
Loading…
Reference in New Issue