<%@ page import="net.sf.acegisecurity.Authentication" %> <%@ page import="net.sf.acegisecurity.GrantedAuthority" %> <%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %> <%@ page import="net.sf.acegisecurity.context.Context" %> <%@ page import="net.sf.acegisecurity.context.ContextHolder" %> <%@ page import="net.sf.acegisecurity.context.security.SecureContext" %> <% Context context = ContextHolder.getContext(); if (context != null) { %> Context on ContextHolder is of type: <%= context.getClass().getName() %>

<% if (context instanceof SecureContext) { %> The Context implements SecureContext.

<% SecureContext sc = (SecureContext) context; Authentication auth = sc.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 (GrantedAuthority aGranted : granted) { %><%= aGranted.toString() %> (getAuthority(): <%= aGranted.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.

<% } } else { %> ContextHolder does not contain a SecureContext.
This is an error and your Acegi Security application will not operate properly until corrected.

<% } } else { %> ContextHolder on ContextHolder is null.
This indicates improper setup of the Acegi Security application. Refer to the reference documentation.
<% } %>