|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
org.eclipse.jetty.security.SecurityHandler
public abstract class SecurityHandler
Abstract SecurityHandler.
Select and apply an Authenticator to a request.
The Authenticator may either be directly set on the handler
or will be create during AbstractLifeCycle.start() with a call to
either the default or set AuthenticatorFactory.
SecurityHandler has a set of initparameters that are used by the Authentication.Configuration. At startup, any context init parameters that start with "org.eclipse.jetty.security." that do not have values in the SecurityHandler init parameters, are copied.
| 嵌套类摘要 | |
|---|---|
class |
SecurityHandler.NotChecked
|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口 |
|---|
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
org.eclipse.jetty.util.component.LifeCycle.Listener |
| 字段摘要 | |
|---|---|
static Principal |
__NO_USER
|
static Principal |
__NOBODY
Nobody user. |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的字段 |
|---|
_handler |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段 |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| 构造方法摘要 | |
|---|---|
protected |
SecurityHandler()
|
| 方法摘要 | |
|---|---|
protected boolean |
checkSecurity(org.eclipse.jetty.server.Request request)
|
protected abstract boolean |
checkUserDataPermissions(String pathInContext,
org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
Object constraintInfo)
|
protected abstract boolean |
checkWebResourcePermissions(String pathInContext,
org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
Object constraintInfo,
org.eclipse.jetty.server.UserIdentity userIdentity)
|
protected void |
doStart()
|
protected void |
doStop()
|
protected org.eclipse.jetty.security.IdentityService |
findIdentityService()
|
protected org.eclipse.jetty.security.LoginService |
findLoginService()
|
org.eclipse.jetty.security.Authenticator |
getAuthenticator()
|
org.eclipse.jetty.security.Authenticator.Factory |
getAuthenticatorFactory()
|
String |
getAuthMethod()
|
static SecurityHandler |
getCurrentSecurityHandler()
|
org.eclipse.jetty.security.IdentityService |
getIdentityService()
Get the identityService. |
String |
getInitParameter(String key)
|
Set<String> |
getInitParameterNames()
|
org.eclipse.jetty.security.LoginService |
getLoginService()
Get the loginService. |
String |
getRealmName()
|
void |
handle(String pathInContext,
org.eclipse.jetty.server.Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected abstract boolean |
isAuthMandatory(org.eclipse.jetty.server.Request baseRequest,
org.eclipse.jetty.server.Response base_response,
Object constraintInfo)
|
boolean |
isCheckWelcomeFiles()
|
boolean |
isSessionRenewedOnAuthentication()
|
void |
logout(org.eclipse.jetty.server.Authentication.User user)
|
protected abstract Object |
prepareConstraintInfo(String pathInContext,
org.eclipse.jetty.server.Request request)
|
void |
setAuthenticator(org.eclipse.jetty.security.Authenticator authenticator)
Set the authenticator. |
void |
setAuthenticatorFactory(org.eclipse.jetty.security.Authenticator.Factory authenticatorFactory)
|
void |
setAuthMethod(String authMethod)
|
void |
setCheckWelcomeFiles(boolean authenticateWelcomeFiles)
|
void |
setIdentityService(org.eclipse.jetty.security.IdentityService identityService)
Set the identityService. |
String |
setInitParameter(String key,
String value)
Set an initialization parameter. |
void |
setLoginService(org.eclipse.jetty.security.LoginService loginService)
Set the loginService. |
void |
setRealmName(String realmName)
|
void |
setSessionRenewedOnAuthentication(boolean renew)
Set renew the session on Authentication. |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的方法 |
|---|
destroy, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler, setServer |
| 从类 org.eclipse.jetty.server.handler.AbstractHandlerContainer 继承的方法 |
|---|
dump, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass |
| 从类 org.eclipse.jetty.server.handler.AbstractHandler 继承的方法 |
|---|
dumpThis, getServer |
| 从类 org.eclipse.jetty.util.component.AggregateLifeCycle 继承的方法 |
|---|
addBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的方法 |
|---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 字段详细信息 |
|---|
public static Principal __NO_USER
public static Principal __NOBODY
| 构造方法详细信息 |
|---|
protected SecurityHandler()
| 方法详细信息 |
|---|
public org.eclipse.jetty.security.IdentityService getIdentityService()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getIdentityServicepublic void setIdentityService(org.eclipse.jetty.security.IdentityService identityService)
identityService - the identityService to setpublic org.eclipse.jetty.security.LoginService getLoginService()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getLoginServicepublic void setLoginService(org.eclipse.jetty.security.LoginService loginService)
loginService - the loginService to setpublic org.eclipse.jetty.security.Authenticator getAuthenticator()
public void setAuthenticator(org.eclipse.jetty.security.Authenticator authenticator)
authenticator -
IllegalStateException - if the SecurityHandler is runningpublic org.eclipse.jetty.security.Authenticator.Factory getAuthenticatorFactory()
public void setAuthenticatorFactory(org.eclipse.jetty.security.Authenticator.Factory authenticatorFactory)
authenticatorFactory - the authenticatorFactory to set
IllegalStateException - if the SecurityHandler is runningpublic String getRealmName()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getRealmNamepublic void setRealmName(String realmName)
realmName - the realmName to set
IllegalStateException - if the SecurityHandler is runningpublic String getAuthMethod()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getAuthMethodpublic void setAuthMethod(String authMethod)
authMethod - the authMethod to set
IllegalStateException - if the SecurityHandler is runningpublic boolean isCheckWelcomeFiles()
public void setCheckWelcomeFiles(boolean authenticateWelcomeFiles)
authenticateWelcomeFiles - True if forwards to welcome files are
authenticated
IllegalStateException - if the SecurityHandler is runningpublic String getInitParameter(String key)
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getInitParameterpublic Set<String> getInitParameterNames()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 getInitParameterNames
public String setInitParameter(String key,
String value)
key - value -
IllegalStateException - if the SecurityHandler is runningprotected org.eclipse.jetty.security.LoginService findLoginService()
protected org.eclipse.jetty.security.IdentityService findIdentityService()
protected void doStart()
throws Exception
org.eclipse.jetty.server.handler.HandlerWrapper 中的 doStartException
protected void doStop()
throws Exception
org.eclipse.jetty.server.handler.HandlerWrapper 中的 doStopExceptionHandlerWrapper.doStop()protected boolean checkSecurity(org.eclipse.jetty.server.Request request)
public boolean isSessionRenewedOnAuthentication()
org.eclipse.jetty.security.Authenticator.AuthConfiguration 中的 isSessionRenewedOnAuthenticationAuthenticator.AuthConfiguration.isSessionRenewedOnAuthentication()public void setSessionRenewedOnAuthentication(boolean renew)
If set to true, then on authentication, the session associated with a reqeuest is invalidated and replaced with a new session.
Authenticator.AuthConfiguration.isSessionRenewedOnAuthentication()
public void handle(String pathInContext,
org.eclipse.jetty.server.Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
org.eclipse.jetty.server.Handler 中的 handleorg.eclipse.jetty.server.handler.HandlerWrapper 中的 handleIOException
javax.servlet.ServletExceptionpublic static SecurityHandler getCurrentSecurityHandler()
public void logout(org.eclipse.jetty.server.Authentication.User user)
protected abstract Object prepareConstraintInfo(String pathInContext,
org.eclipse.jetty.server.Request request)
protected abstract boolean checkUserDataPermissions(String pathInContext,
org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
Object constraintInfo)
throws IOException
IOException
protected abstract boolean isAuthMandatory(org.eclipse.jetty.server.Request baseRequest,
org.eclipse.jetty.server.Response base_response,
Object constraintInfo)
protected abstract boolean checkWebResourcePermissions(String pathInContext,
org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
Object constraintInfo,
org.eclipse.jetty.server.UserIdentity userIdentity)
throws IOException
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||