org.mortbay.http.handler
Class SecurityHandler
java.lang.Object
|
+--org.mortbay.http.handler.NullHandler
|
+--org.mortbay.http.handler.SecurityHandler
- All Implemented Interfaces:
- HttpHandler, LifeCycle
- public class SecurityHandler
- extends NullHandler
Handler to enforce SecurityConstraints.
- Version:
- $Id: SecurityHandler.java,v 1.10 2001/10/22 23:43:56 gregwilkins Exp $
- Author:
- Greg Wilkins (gregw)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
__BASIC_AUTH
public static final java.lang.String __BASIC_AUTH
__FORM_AUTH
public static final java.lang.String __FORM_AUTH
__ATTR
public static final java.lang.String __ATTR
SecurityHandler
public SecurityHandler()
getUserRealm
public UserRealm getUserRealm()
getRealmName
public java.lang.String getRealmName()
setRealmName
public void setRealmName(java.lang.String realmName)
setRealm
public void setRealm(java.lang.String realmName,
UserRealm realm)
getAuthMethod
public java.lang.String getAuthMethod()
setAuthMethod
public void setAuthMethod(java.lang.String method)
getLoginPage
public java.lang.String getLoginPage()
setLoginPage
public void setLoginPage(java.lang.String page)
getErrorPage
public java.lang.String getErrorPage()
setErrorPage
public void setErrorPage(java.lang.String page)
addSecurityConstraint
public void addSecurityConstraint(java.lang.String pathSpec,
SecurityConstraint sc)
start
public void start()
throws java.lang.Exception
- Description copied from interface:
HttpHandler
- Start the handler.
All requests are ignored until start is called.
- Overrides:
start
in class NullHandler
- Following copied from interface:
org.mortbay.util.LifeCycle
- Throws:
java.lang.Exception
- An arbitrary exception may be thrown.
handle
public void handle(java.lang.String pathInContext,
java.lang.String pathParams,
HttpRequest request,
HttpResponse response)
throws HttpException,
java.io.IOException
- Description copied from interface:
HttpHandler
- Handle a request.
- Following copied from interface:
org.mortbay.http.HttpHandler
- Parameters:
pathInContext
- The context pathpathParams
- Path parameters such as encoded Session IDrequest
- The requestresponse
- The response.
addUser
public void addUser(java.lang.String username,
java.lang.String password)
- Deprecated. use HttpServer.addRealm()
Copyright © 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.