Statistics
| Revision:

svn-gvsig-desktop / tmp / trunk / servidor / WPS_Callejero_Server / wps / WebContent / secure / debug.jsp @ 26650

History | View | Annotate | Download (1.16 KB)

1
<%@ page import="org.acegisecurity.context.SecurityContextHolder" %>
2
<%@ page import="org.acegisecurity.Authentication" %>
3
<%@ page import="org.acegisecurity.GrantedAuthority" %>
4
<%@ page import="org.acegisecurity.adapters.AuthByAdapter" %>
5

    
6
<% 
7
		Authentication auth = SecurityContextHolder.getContext().getAuthentication();
8
		if (auth != null) { %>
9
			Authentication object is of type: <%= auth.getClass().getName() %><BR><BR>
10
			Authentication object as a String: <%= auth.toString() %><BR><BR>
11
			
12
			Authentication object holds the following granted authorities:<BR><BR>
13
<%			GrantedAuthority[] granted = auth.getAuthorities();
14
			for (int i = 0; i < granted.length; i++) { %>
15
				<%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)<BR>
16
<%			}
17

    
18
			if (auth instanceof AuthByAdapter) { %>
19
				<BR><B>SUCCESS! Your container adapter appears to be properly configured!</B><BR><BR>
20
<%			} else { %>
21
				<BR><B>SUCCESS! Your web filters appear to be properly configured!</B><BR>
22
<%			}
23
			
24
		} else { %>
25
			Authentication object is null.<BR>
26
			This is an error and your Acegi Security application will not operate properly until corrected.<BR><BR>
27
<%		}
28
%>