public class SecurityHandler extends HandlerWrapper
Modifier and Type | Class and Description |
---|---|
class |
SecurityHandler.NotChecked |
Modifier and Type | Field and Description |
---|---|
static java.security.Principal |
__NO_USER |
static java.security.Principal |
__NOBODY
Nobody user.
|
_string
Constructor and Description |
---|
SecurityHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkSecurityConstraints(java.lang.String pathInContext,
Request request,
Response response) |
void |
doStart() |
Authenticator |
getAuthenticator() |
java.lang.String |
getAuthMethod() |
ConstraintMapping[] |
getConstraintMappings() |
UserRealm |
getUserRealm() |
void |
handle(java.lang.String target,
HttpServletRequest request,
HttpServletResponse response,
int dispatch)
Handle a request.
|
boolean |
hasConstraints() |
boolean |
isCheckWelcomeFiles() |
void |
setAuthenticator(Authenticator authenticator) |
void |
setAuthMethod(java.lang.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 java.security.Principal __NO_USER
public static java.security.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 java.lang.String getAuthMethod()
public void setAuthMethod(java.lang.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 java.lang.Exception
doStart
in class HandlerWrapper
java.lang.Exception
public void handle(java.lang.String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws java.io.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
java.io.IOException
ServletException
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.