public abstract class SecurityHandler extends HandlerWrapper implements Authenticator.AuthConfiguration
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.
| Modifier and Type | Class and Description |
|---|---|
class |
SecurityHandler.NotChecked |
AbstractHandler.ErrorDispatchHandlerAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerContainer.InheritedListener, Container.Listener| Modifier and Type | Field and Description |
|---|---|
static Principal |
__NO_USER |
static Principal |
__NOBODY
Nobody user.
|
destroy, getHandler, getHandlers, insertHandler, setHandlerfindContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServergetServeraddBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopdumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, namedpublic static final Principal __NO_USER
public static final Principal __NOBODY
public IdentityService getIdentityService()
getIdentityService in interface Authenticator.AuthConfigurationpublic void setIdentityService(IdentityService identityService)
identityService - the identityService to setpublic LoginService getLoginService()
getLoginService in interface Authenticator.AuthConfigurationpublic void setLoginService(LoginService loginService)
loginService - the loginService to setpublic Authenticator getAuthenticator()
public void setAuthenticator(Authenticator authenticator)
authenticator - the authenticatorIllegalStateException - if the SecurityHandler is runningpublic Authenticator.Factory getAuthenticatorFactory()
public void setAuthenticatorFactory(Authenticator.Factory authenticatorFactory)
authenticatorFactory - the authenticatorFactory to setIllegalStateException - if the SecurityHandler is runningpublic List<Authenticator.Factory> getKnownAuthenticatorFactories()
public String getRealmName()
getRealmName in interface Authenticator.AuthConfigurationpublic void setRealmName(String realmName)
realmName - the realmName to setIllegalStateException - if the SecurityHandler is runningpublic String getAuthMethod()
getAuthMethod in interface Authenticator.AuthConfigurationpublic void setAuthMethod(String authMethod)
authMethod - the authMethod to setIllegalStateException - if the SecurityHandler is runningpublic boolean isCheckWelcomeFiles()
public void setCheckWelcomeFiles(boolean authenticateWelcomeFiles)
authenticateWelcomeFiles - True if forwards to welcome files are
authenticatedIllegalStateException - if the SecurityHandler is runningpublic String getInitParameter(String key)
Authenticator.AuthConfigurationgetInitParameter in interface Authenticator.AuthConfigurationkey - parameter namegetInitParameter(String)public Set<String> getInitParameterNames()
Authenticator.AuthConfigurationgetInitParameterNames in interface Authenticator.AuthConfigurationgetInitParameterNames()public String setInitParameter(String key, String value)
key - the init keyvalue - the init valueIllegalStateException - if the SecurityHandler is startedpublic boolean isSessionRenewedOnAuthentication()
isSessionRenewedOnAuthentication in interface Authenticator.AuthConfigurationAuthenticator.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.
renew - true to renew the authentication on sessionAuthenticator.AuthConfiguration.isSessionRenewedOnAuthentication()public void handle(String pathInContext, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
Handlerhandle in interface Handlerhandle in class HandlerWrapperpathInContext - 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
HttpConnection.getCurrentConnection().getHttpChannel().getRequest()
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().getHttpChannel().getResponse()
method can be used access the Response object if required.IOException - if unable to handle the request or response processingServletException - if unable to handle the request or response due to underlying servlet issuepublic static SecurityHandler getCurrentSecurityHandler()
public void logout(Authentication.User user)
Copyright © 2010 - 2020 Adobe. All Rights Reserved