|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
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 继承的嵌套类/接口 |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
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(Request request)
|
protected abstract boolean |
checkUserDataPermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo)
|
protected abstract boolean |
checkWebResourcePermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo,
UserIdentity userIdentity)
|
protected void |
doStart()
Start the managed lifecycle beans in the order they were added. |
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added. |
protected IdentityService |
findIdentityService()
|
protected LoginService |
findLoginService()
|
Authenticator |
getAuthenticator()
|
Authenticator.Factory |
getAuthenticatorFactory()
|
String |
getAuthMethod()
|
static SecurityHandler |
getCurrentSecurityHandler()
|
IdentityService |
getIdentityService()
Get the identityService. |
String |
getInitParameter(String key)
Get a SecurityHandler init parameter |
Set<String> |
getInitParameterNames()
Get a SecurityHandler init parameter names |
LoginService |
getLoginService()
Get the loginService. |
String |
getRealmName()
|
void |
handle(String pathInContext,
Request baseRequest,
HttpServletRequest request,
HttpServletResponse response)
Handle a request. |
protected abstract boolean |
isAuthMandatory(Request baseRequest,
Response base_response,
Object constraintInfo)
|
boolean |
isCheckWelcomeFiles()
|
boolean |
isSessionRenewedOnAuthentication()
|
void |
logout(Authentication.User user)
|
protected abstract Object |
prepareConstraintInfo(String pathInContext,
Request request)
|
void |
setAuthenticator(Authenticator authenticator)
Set the authenticator. |
void |
setAuthenticatorFactory(Authenticator.Factory authenticatorFactory)
|
void |
setAuthMethod(String authMethod)
|
void |
setCheckWelcomeFiles(boolean authenticateWelcomeFiles)
|
void |
setIdentityService(IdentityService identityService)
Set the identityService. |
String |
setInitParameter(String key,
String value)
Set an initialization parameter. |
void |
setLoginService(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 IdentityService getIdentityService()
Authenticator.AuthConfiguration 中的 getIdentityServicepublic void setIdentityService(IdentityService identityService)
identityService - the identityService to setpublic LoginService getLoginService()
Authenticator.AuthConfiguration 中的 getLoginServicepublic void setLoginService(LoginService loginService)
loginService - the loginService to setpublic Authenticator getAuthenticator()
public void setAuthenticator(Authenticator authenticator)
authenticator -
IllegalStateException - if the SecurityHandler is runningpublic Authenticator.Factory getAuthenticatorFactory()
public void setAuthenticatorFactory(Authenticator.Factory authenticatorFactory)
authenticatorFactory - the authenticatorFactory to set
IllegalStateException - if the SecurityHandler is runningpublic String getRealmName()
Authenticator.AuthConfiguration 中的 getRealmNamepublic void setRealmName(String realmName)
realmName - the realmName to set
IllegalStateException - if the SecurityHandler is runningpublic String getAuthMethod()
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)
Authenticator.AuthConfiguration 复制的描述
Authenticator.AuthConfiguration 中的 getInitParameterkey - parameter name
getInitParameter(String)public Set<String> getInitParameterNames()
Authenticator.AuthConfiguration 复制的描述
Authenticator.AuthConfiguration 中的 getInitParameterNamesgetInitParameterNames()
public String setInitParameter(String key,
String value)
key - value -
IllegalStateException - if the SecurityHandler is runningprotected LoginService findLoginService()
protected IdentityService findIdentityService()
protected void doStart()
throws Exception
AggregateLifeCycle 复制的描述
HandlerWrapper 中的 doStartExceptionAbstractLifeCycle.doStart()
protected void doStop()
throws Exception
AggregateLifeCycle 复制的描述
HandlerWrapper 中的 doStopExceptionHandlerWrapper.doStop()protected boolean checkSecurity(Request request)
public boolean isSessionRenewedOnAuthentication()
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,
Request baseRequest,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Handler 复制的描述
Handler 中的 handleHandlerWrapper 中的 handlepathInContext - The target of the request - either a URI or a name.baseRequest - The original unwrapped request object.request - The request either as the Request
object or a wrapper of that request. The AbstractHttpConnection.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 AbstractHttpConnection.getCurrentConnection()
method can be used access the Response object if required.
IOException
ServletExceptionpublic static SecurityHandler getCurrentSecurityHandler()
public void logout(Authentication.User user)
protected abstract Object prepareConstraintInfo(String pathInContext,
Request request)
protected abstract boolean checkUserDataPermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo)
throws IOException
IOException
protected abstract boolean isAuthMandatory(Request baseRequest,
Response base_response,
Object constraintInfo)
protected abstract boolean checkWebResourcePermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo,
UserIdentity userIdentity)
throws IOException
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||