<%@ page import="net.sf.acegisecurity.context.SecurityContextHolder" %> <%@ page import="net.sf.acegisecurity.Authentication" %> <%@ page import="net.sf.acegisecurity.GrantedAuthority" %> <%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %> <% Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null) { %> Authentication object is of type: <%= auth.getClass().getName() %>

Authentication object as a String: <%= auth.toString() %>

Authentication object holds the following granted authorities:

<% GrantedAuthority[] granted = auth.getAuthorities(); for (int i = 0; i < granted.length; i++) { %> <%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)
<% } if (auth instanceof AuthByAdapter) { %>
SUCCESS! Your container adapter appears to be properly configured!

<% } else { %>
SUCCESS! Your web filters appear to be properly configured!
<% } } else { %> Authentication object is null.
This is an error and your Acegi Security application will not operate properly until corrected.

<% } %>