org.mortbay.jetty.security
public class SecurityHandler extends HandlerWrapper
Modifier and Type | Class and Description |
---|---|
class |
SecurityHandler.NotChecked |
Modifier and Type | Field and Description |
---|---|
static Principal |
__NO_USER |
static Principal |
__NOBODY
Nobody user.
|
_string
Constructor and Description |
---|
SecurityHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkSecurityConstraints(String pathInContext,
Request request,
Response response) |
void |
doStart() |
Authenticator |
getAuthenticator() |
String |
getAuthMethod() |
ConstraintMapping[] |
getConstraintMappings() |
UserRealm |
getUserRealm() |
void |
handle(String target,
HttpServletRequest request,
HttpServletResponse response,
int dispatch)
Handle a request.
|
boolean |
hasConstraints() |
boolean |
isCheckWelcomeFiles() |
void |
setAuthenticator(Authenticator authenticator) |
void |
setAuthMethod(String method) |
void |
setCheckWelcomeFiles(boolean authenticateWelcomeFiles) |
void |
setConstraintMappings(ConstraintMapping[] constraintMappings) |
void |
setUserRealm(UserRealm userRealm) |
addHandler, doStop, expandChildren, getHandler, removeHandler, setHandler, setServer
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
destroy, getServer, toString
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public static Principal __NO_USER
public static Principal __NOBODY
public Authenticator getAuthenticator()
public void setAuthenticator(Authenticator authenticator)
authenticator
- The authenticator to set.public UserRealm getUserRealm()
public void setUserRealm(UserRealm userRealm)
userRealm
- The userRealm to set.public ConstraintMapping[] getConstraintMappings()
public void setConstraintMappings(ConstraintMapping[] constraintMappings)
contraintMappings
- The contraintMappings to set.public String getAuthMethod()
public void setAuthMethod(String method)
public boolean hasConstraints()
public boolean isCheckWelcomeFiles()
public void setCheckWelcomeFiles(boolean authenticateWelcomeFiles)
authenticateWelcomeFiles
- True if forwards to welcome files are authenticatedpublic void doStart() throws Exception
doStart
in class HandlerWrapper
Exception
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException
Handler
handle
in interface Handler
handle
in class HandlerWrapper
target
- The target of the request - either a URI or a name.request
- The request either as the Request
object or a wrapper of that request. The HttpConnection.getCurrentConnection()
method can be used access the Request object if required.response
- The response as the Response
object or a wrapper of that request. The HttpConnection.getCurrentConnection()
method can be used access the Response object if required.dispatch
- The dispatch mode: Handler.REQUEST
, Handler.FORWARD
, Handler.INCLUDE
, Handler.ERROR
IOException
ServletException
public boolean checkSecurityConstraints(String pathInContext, Request request, Response response) throws IOException
IOException
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.