debug.jsp 1.2 KB

12345678910111213141516171819202122232425262728
  1. <%@ page import="net.sf.acegisecurity.context.SecurityContextHolder" %>
  2. <%@ page import="net.sf.acegisecurity.Authentication" %>
  3. <%@ page import="net.sf.acegisecurity.GrantedAuthority" %>
  4. <%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %>
  5. <%
  6. Authentication auth = SecurityContextHolder.getContext().getAuthentication();
  7. if (auth != null) { %>
  8. Authentication object is of type: <%= auth.getClass().getName() %><BR><BR>
  9. Authentication object as a String: <%= auth.toString() %><BR><BR>
  10. Authentication object holds the following granted authorities:<BR><BR>
  11. <% GrantedAuthority[] granted = auth.getAuthorities();
  12. for (int i = 0; i < granted.length; i++) { %>
  13. <%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)<BR>
  14. <% }
  15. if (auth instanceof AuthByAdapter) { %>
  16. <BR><B>SUCCESS! Your container adapter appears to be properly configured!</B><BR><BR>
  17. <% } else { %>
  18. <BR><B>SUCCESS! Your web filters appear to be properly configured!</B><BR>
  19. <% }
  20. } else { %>
  21. Authentication object is null.<BR>
  22. This is an error and your Acegi Security application will not operate properly until corrected.<BR><BR>
  23. <% }
  24. %>