SEC-1536: added JAAS API Integration, updated doc, updated jaas sample
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<%@ page import="javax.security.auth.Subject" %>
|
||||
<%@ page import="java.security.AccessController" %>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
<html>
|
||||
<body>
|
||||
@@ -9,6 +11,9 @@ Anyone can view this page.
|
||||
Your principal object is....: <%= request.getUserPrincipal() %>
|
||||
</p>
|
||||
<p>
|
||||
Subject.getSubject(AccessController.getContext()) is....: <%= Subject.getSubject(AccessController.getContext()) %>
|
||||
</p>
|
||||
<p>
|
||||
<sec:authorize url='/secure/index.jsp'>You can currently access "/secure" URLs.</sec:authorize>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<%@ page import="javax.security.auth.Subject" %>
|
||||
<%@ page import="java.security.AccessController" %>
|
||||
<%@ page import="org.springframework.security.core.context.SecurityContextHolder" %>
|
||||
<%@ page import="org.springframework.security.core.Authentication" %>
|
||||
<%@ page import="org.springframework.security.core.GrantedAuthority" %>
|
||||
@@ -10,6 +12,15 @@
|
||||
|
||||
<h3>Security Debug Information</h3>
|
||||
|
||||
<%
|
||||
|
||||
Subject subject = Subject.getSubject(AccessController.getContext());
|
||||
if(subject != null) { %>
|
||||
<p>
|
||||
Subject.getSubject(AccessController.getContext()) is....: <%= subject %>
|
||||
</p>
|
||||
<%} %>
|
||||
|
||||
<%
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null) { %>
|
||||
|
||||
Reference in New Issue
Block a user