%@ page import="net.sf.acegisecurity.context.Context" %>
<%@ page import="net.sf.acegisecurity.context.ContextHolder" %>
<%@ page import="net.sf.acegisecurity.context.SecureContext" %>
<%@ page import="net.sf.acegisecurity.Authentication" %>
<%@ page import="net.sf.acegisecurity.GrantedAuthority" %>
<%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %>
<% 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 (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 filter appears to be properly configured!
<% }
} else { %>
Authentication object is null.
This is an error and your container adapter will not operate properly until corrected.
<% }
} else { %>
ContextHolder does not contain a SecureContext.
This is an error and your container adapter will not operate properly until corrected.
<% }
} else { %>
ContextHolder on ContextHolder is null.
This indicates improper setup of the container adapter. Refer to the reference documentation.
Also ensure the correct subclass of AbstractMvcIntegrationInterceptor is being used for your container.
<%}
%>