SEC-1132: Moved access-control/authorization specific code to org.sf.security.access package. Created provisioning package for user management classes to remove cyclical deps. Some other moving of classes to remove code tangles. Restructuring of portlet module under org.sf.security.portlet
This commit is contained in:
+4
-4
@@ -15,8 +15,8 @@ import org.springframework.security.web.authentication.AbstractProcessingFilter;
|
||||
|
||||
|
||||
/**
|
||||
* A simple portlet which prints out the contents of the current {@link org.springframework.security.context.SecurityContext}
|
||||
*
|
||||
* A simple portlet which prints out the contents of the current {@link org.springframework.security.context.SecurityContext}
|
||||
*
|
||||
* @author Luke Taylor
|
||||
*/
|
||||
public class SecurityContextPortlet extends GenericPortlet {
|
||||
@@ -27,13 +27,13 @@ public class SecurityContextPortlet extends GenericPortlet {
|
||||
out.println("<h2>Security Context Display Portlet</h2>");
|
||||
out.println("<p>");
|
||||
out.println(new Date());
|
||||
out.println("<p>Current Session " + request.getPortletSession().getId() + "</p>");
|
||||
out.println("<p>Current Session " + request.getPortletSession().getId() + "</p>");
|
||||
out.println("</p>");
|
||||
out.println("<p>The security context contains: " +
|
||||
SecurityContextHolder.getContext().getAuthentication() +
|
||||
"</p>");
|
||||
Object lastException = request.getPortletSession().getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY, PortletSession.APPLICATION_SCOPE);
|
||||
|
||||
|
||||
if (lastException != null) {
|
||||
out.println("Last Exception: " + lastException);
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
<bean id="defaultExceptionHandler" parent="defaultExceptionHandlerTemplate"/>
|
||||
|
||||
<bean id="portletContextIntegrationInterceptor" class="org.springframework.security.context.PortletSessionContextIntegrationInterceptor"/>
|
||||
<bean id="portletContextIntegrationInterceptor" class="org.springframework.security.portlet.PortletSessionContextIntegrationInterceptor"/>
|
||||
|
||||
<bean id="portletAuthenticationInterceptor" class="org.springframework.security.ui.portlet.PortletProcessingInterceptor">
|
||||
<bean id="portletAuthenticationInterceptor" class="org.springframework.security.portlet.PortletProcessingInterceptor">
|
||||
<property name="authenticationDetailsSource">
|
||||
<bean class="org.springframework.security.ui.portlet.PortletPreAuthenticatedAuthenticationDetailsSource">
|
||||
<bean class="org.springframework.security.portlet.PortletPreAuthenticatedAuthenticationDetailsSource">
|
||||
<property name="mappableRolesRetriever">
|
||||
<bean class="org.springframework.security.authoritymapping.SimpleMappableAttributesRetriever">
|
||||
<bean class="org.springframework.security.access.authoritymapping.SimpleMappableAttributesRetriever">
|
||||
<property name="mappableAttributes">
|
||||
<set>
|
||||
<value>tomcat</value>
|
||||
|
||||
Reference in New Issue
Block a user