org.apache.geronimo.jetty.interceptor
Class SecurityContextBeforeAfter
java.lang.Object
org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter
- All Implemented Interfaces:
- BeforeAfter
- public class SecurityContextBeforeAfter
- extends Object
- implements BeforeAfter
- Version:
- $Rev: 397916 $ $Date: 2006-04-28 17:12:20 +0200 (Fri, 28 Apr 2006) $
Constructor Summary |
SecurityContextBeforeAfter(BeforeAfter next,
int policyContextIDIndex,
int webAppContextIndex,
String policyContextID,
org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal,
org.mortbay.http.Authenticator authenticator,
PermissionCollection checkedPermissions,
PermissionCollection excludedPermissions,
Map roleDesignates,
JAASJettyRealm realm,
ClassLoader classLoader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecurityContextBeforeAfter
public SecurityContextBeforeAfter(BeforeAfter next,
int policyContextIDIndex,
int webAppContextIndex,
String policyContextID,
org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal,
org.mortbay.http.Authenticator authenticator,
PermissionCollection checkedPermissions,
PermissionCollection excludedPermissions,
Map roleDesignates,
JAASJettyRealm realm,
ClassLoader classLoader)
stop
public void stop(JettyContainer jettyContainer)
before
public void before(Object[] context,
org.mortbay.http.HttpRequest httpRequest,
org.mortbay.http.HttpResponse httpResponse)
- Specified by:
before
in interface BeforeAfter
after
public void after(Object[] context,
org.mortbay.http.HttpRequest httpRequest,
org.mortbay.http.HttpResponse httpResponse)
- Specified by:
after
in interface BeforeAfter
getCurrentRoleDesignate
public static Subject getCurrentRoleDesignate(String role)
checkSecurityConstraints
public boolean checkSecurityConstraints(String pathInContext,
org.mortbay.http.HttpRequest request,
org.mortbay.http.HttpResponse response)
throws org.mortbay.http.HttpException,
IOException
- Check the security constraints using JACC.
- Parameters:
pathInContext
- path in contextrequest
- HTTP requestresponse
- HTTP response
- Returns:
- true if the path in context passes the security check,
false if it fails or a redirection has occured during authentication.
- Throws:
org.mortbay.http.HttpException
IOException
generateDefaultPrincipal
protected JAASJettyPrincipal generateDefaultPrincipal(org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal,
ClassLoader classLoader)
throws org.apache.geronimo.common.GeronimoSecurityException
- Generate the default principal from the security config.
- Parameters:
defaultPrincipal
- The Geronimo security configuration.classLoader
-
- Returns:
- the default principal
- Throws:
org.apache.geronimo.common.GeronimoSecurityException
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.