public class OAuthManagedResourceValve
extends org.apache.catalina.authenticator.FormAuthenticator
implements org.apache.catalina.LifecycleListener
Redirects browser to remote authentication server if not logged in. Also allows OAuth Bearer Token requests that contain a Skeleton Key bearer tokens.
Modifier and Type | Field and Description |
---|---|
protected RealmConfiguration |
realmConfiguration |
protected ManagedResourceConfig |
remoteSkeletonKeyConfig |
protected ResourceMetadata |
resourceMetadata |
protected UserSessionManagement |
userSessionManagement |
characterEncoding, info, landingPage
AUTH_HEADER_NAME, cache, changeSessionIdOnAuthentication, context, disableProxyCaching, lifecycle, REALM_NAME, securePagesWithPragma, SESSION_ID_BYTES, sm, sso, started
Constructor and Description |
---|
OAuthManagedResourceValve() |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(org.apache.catalina.connector.Request request,
javax.servlet.http.HttpServletResponse response,
org.apache.catalina.deploy.LoginConfig config) |
protected boolean |
bearer(boolean challenge,
org.apache.catalina.connector.Request request,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
checkLoggedIn(org.apache.catalina.connector.Request request,
javax.servlet.http.HttpServletResponse response) |
protected void |
init() |
void |
invoke(org.apache.catalina.connector.Request request,
org.apache.catalina.connector.Response response) |
void |
lifecycleEvent(org.apache.catalina.LifecycleEvent event) |
protected void |
oauth(org.apache.catalina.connector.Request request,
javax.servlet.http.HttpServletResponse response)
This method always set the HTTP response, so do not continue after invoking
|
protected void |
remoteLogout(org.apache.catalina.connector.Request request,
javax.servlet.http.HttpServletResponse response) |
void |
start() |
forwardToErrorPage, forwardToLoginPage, getCharacterEncoding, getInfo, getLandingPage, matchRequest, restoreRequest, savedRequestURL, saveRequest, setCharacterEncoding, setLandingPage
addLifecycleListener, associate, authenticate, findLifecycleListeners, generateSessionId, getCache, getContainer, getDisableProxyCaching, getSecurePagesWithPragma, isChangeSessionIdOnAuthentication, login, logout, reauthenticateFromSSO, register, removeLifecycleListener, setCache, setChangeSessionIdOnAuthentication, setContainer, setDisableProxyCaching, setSecurePagesWithPragma, stop, unregister
protected RealmConfiguration realmConfiguration
protected UserSessionManagement userSessionManagement
protected ManagedResourceConfig remoteSkeletonKeyConfig
protected ResourceMetadata resourceMetadata
public void start() throws org.apache.catalina.LifecycleException
start
in interface org.apache.catalina.Lifecycle
start
in class org.apache.catalina.authenticator.AuthenticatorBase
org.apache.catalina.LifecycleException
public void lifecycleEvent(org.apache.catalina.LifecycleEvent event)
lifecycleEvent
in interface org.apache.catalina.LifecycleListener
protected void init()
public void invoke(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response) throws IOException, javax.servlet.ServletException
invoke
in interface org.apache.catalina.Valve
invoke
in class org.apache.catalina.authenticator.AuthenticatorBase
IOException
javax.servlet.ServletException
public boolean authenticate(org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response, org.apache.catalina.deploy.LoginConfig config) throws IOException
authenticate
in class org.apache.catalina.authenticator.FormAuthenticator
IOException
protected void remoteLogout(org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected boolean bearer(boolean challenge, org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response) throws LoginException, IOException
LoginException
IOException
protected boolean checkLoggedIn(org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response)
protected void oauth(org.apache.catalina.connector.Request request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.