Revision 11af52e2

b/gss/jboss/conf/gss.properties
2 2
restUrl=http://localhost:8080/pithos/rest/
3 3
externalApiPath=gss/ExternalAPIBean/local
4 4
version=1.0.0-beta
5

  
5
noUsernameMessage=<B>No username found in the Shibboleth attributes!</B><P>Your Identity Provider sent the following attributes:
6 6
fileRepositoryPath=/tmp/gss-root
7 7
#quota in bytes(10GB)
8 8
quota=10737418240
b/gss/src/gr/ebs/gss/server/Login.java
130 130
		Object mailAttr = request.getAttribute("HTTP_SHIB_INETORGPERSON_MAIL"); // Multi-valued
131 131
		Object userclassAttr = request.getAttribute("HTTP_SHIB_EP_UNSCOPEDAFFILIATION"); // Multi-valued
132 132
		if (usernameAttr == null) {
133
		    PrintWriter out = response.getWriter();
134
		    out.println("<HTML>");
135
		    out.println("<HEAD><TITLE>" + getServiceName() + " Authentication</TITLE>" +
136
		    		"<LINK TYPE='text/css' REL='stylesheet' HREF='gss.css'></HEAD>");
137
		    out.println("<BODY><CENTER><P>");
138
		    out.println("<B>No username found in the Shibboleth attributes!</B><P>");
139
		    out.println("Your Identity Provider sent the following attributes:<P>");
140
		    out.println("eduPersonPrincipalName (eduPerson): -<BR><P>");
141
		    out.println("displayName (inetOrgPerson): " +
142
		    			(nameAttr==null? "-": nameAttr.toString()) + "<BR><P>");
143
		    out.println("givenName (inetOrgPerson): " +
144
		    			(givennameAttr==null? "-": givennameAttr.toString()) + "<BR><P>");
145
		    out.println("sn (person): " +
146
		    			(snAttr==null? "-": snAttr.toString()) + "<BR><P>");
147
		    out.println("cn (person): " +
148
		    			(cnAttr==null? "-": cnAttr.toString()) + "<BR><P>");
149
		    out.println("mail (inetOrgPerson): " +
150
		    			(mailAttr==null? "-": mailAttr.toString()) + "<BR><P>");
151
		    out.println("eduPersonPrimaryAffiliation (eduPerson): " +
152
		    			(userclassAttr==null? "-": userclassAttr.toString()) + "<BR>");
153
		    out.println("</CENTER></BODY></HTML>");
133
			String authErrorUrl = "authenticationError.jsp";
134
			authErrorUrl += "?name=" + (nameAttr==null? "-": nameAttr.toString());
135
			authErrorUrl += "&givenname=" + (givennameAttr==null? "-": givennameAttr.toString());
136
			authErrorUrl += "&sn=" + (snAttr==null? "-": snAttr.toString());
137
			authErrorUrl += "&cn=" + (cnAttr==null? "-": cnAttr.toString());
138
			authErrorUrl += "&mail=" + (mailAttr==null? "-": mailAttr.toString());
139
			authErrorUrl += "&userclass=" + (userclassAttr==null? "-": userclassAttr.toString());
140
			response.sendRedirect(authErrorUrl);
154 141
			return;
155 142
		}
156 143
		String username = usernameAttr.toString();
b/gss/war/authenticationError.jsp
1
<%--
2

  
3
Copyright 2009 Electronic Business Systems Ltd.
4
 
5
This file is part of GSS.
6

  
7
GSS is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11

  
12
GSS is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16

  
17
You should have received a copy of the GNU General Public License
18
along with GSS.  If not, see <http://www.gnu.org/licenses/>.
19

  
20
--%>
21
<%@ page language="java" contentType="text/html; charset=UTF-8"
22
    pageEncoding="UTF-8"%>
23
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
24

  
25
<%@page import="gr.ebs.gss.server.configuration.GSSConfigurationFactory"%><html>
26
<head>
27
<title><%= GSSConfigurationFactory.getConfiguration().getString("serviceName") %> Authentication</title>
28
<link href="/pithos/gss.css" rel="stylesheet" type="text/css">
29
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
30
</head>
31
<body>
32

  
33
<center>
34
<p>
35
<%= GSSConfigurationFactory.getConfiguration().getString("noUsernameMessage") %>
36
<P>eduPersonPrincipalName (eduPerson): -<BR>
37
<P>displayName (inetOrgPerson): <%= request.getParameter("name") %><BR>
38
<P>givenName (inetOrgPerson): <%= request.getParameter("givenname") %><BR>
39
<P>sn (person): <%= request.getParameter("sn") %><BR>
40
<P>cn (person): <%= request.getParameter("cn") %><BR>
41
<P>mail (inetOrgPerson): <%= request.getParameter("mail") %><BR>
42
<P>eduPersonPrimaryAffiliation (eduPerson): <%= request.getParameter("userclass") %><BR>
43
</center>
44

  
45
</body>
46
</html>

Also available in: Unified diff