org.apache.geronimo.jetty6.handler
Class JettySecurityHandler
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.handler.AbstractHandler
org.mortbay.jetty.handler.AbstractHandlerContainer
org.mortbay.jetty.handler.HandlerWrapper
org.mortbay.jetty.security.SecurityHandler
org.apache.geronimo.jetty6.handler.JettySecurityHandler
- All Implemented Interfaces:
- org.mortbay.component.LifeCycle, org.mortbay.jetty.Handler, org.mortbay.jetty.HandlerContainer
public class JettySecurityHandler
- extends org.mortbay.jetty.security.SecurityHandler
Nested classes/interfaces inherited from class org.mortbay.jetty.security.SecurityHandler |
org.mortbay.jetty.security.SecurityHandler.NotChecked |
Fields inherited from class org.mortbay.jetty.security.SecurityHandler |
__NO_USER, __NOBODY |
Fields inherited from class org.mortbay.jetty.handler.AbstractHandler |
_string |
Fields inherited from interface org.mortbay.jetty.Handler |
ALL, DEFAULT, ERROR, FORWARD, INCLUDE, REQUEST |
Methods inherited from class org.mortbay.jetty.security.SecurityHandler |
doStart, getAuthenticator, getAuthMethod, getConstraintMappings, getUserRealm, isCheckWelcomeFiles, setAuthenticator, setAuthMethod, setCheckWelcomeFiles, setConstraintMappings, setUserRealm |
Methods inherited from class org.mortbay.jetty.handler.HandlerWrapper |
addHandler, doStop, expandChildren, getHandler, setHandler, setServer |
Methods inherited from class org.mortbay.jetty.handler.AbstractHandlerContainer |
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass |
Methods inherited from class org.mortbay.jetty.handler.AbstractHandler |
destroy, getServer, toString |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop |
Methods inherited from interface org.mortbay.component.LifeCycle |
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop |
JettySecurityHandler
public JettySecurityHandler(org.mortbay.jetty.security.Authenticator authenticator,
JAASJettyRealm userRealm,
String policyContextID,
Subject defaultSubject)
hasConstraints
public boolean hasConstraints()
- Overrides:
hasConstraints
in class org.mortbay.jetty.security.SecurityHandler
doStop
public void doStop(JettyContainer jettyContainer)
throws Exception
- Throws:
Exception
handle
public void handle(String target,
HttpServletRequest request,
HttpServletResponse response,
int dispatch)
throws IOException,
ServletException
- Specified by:
handle
in interface org.mortbay.jetty.Handler
- Overrides:
handle
in class org.mortbay.jetty.security.SecurityHandler
- Throws:
IOException
ServletException
checkSecurityConstraints
public boolean checkSecurityConstraints(String pathInContext,
org.mortbay.jetty.Request request,
org.mortbay.jetty.Response response)
throws IOException
- Check the security constraints using JACC.
- Overrides:
checkSecurityConstraints
in class org.mortbay.jetty.security.SecurityHandler
- 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:
IOException
generateDefaultPrincipal
protected JAASJettyPrincipal generateDefaultPrincipal(Subject defaultSubject)
throws GeronimoSecurityException
- Generate the default principal from the security config.
- Parameters:
defaultSubject
- The default subject.
- Returns:
- the default principal
- Throws:
GeronimoSecurityException
- if the default principal cannot be constructed
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.