org.jboss.resteasy.skeleton.key.as7

## Class OAuthManagedResourceValve

- java.lang.Object
- - org.apache.catalina.valves.ValveBase
  - - org.apache.catalina.authenticator.AuthenticatorBase
    - - org.apache.catalina.authenticator.FormAuthenticator
      - - org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve

- All Implemented Interfaces:
    MBeanRegistration, org.apache.catalina.Authenticator, org.apache.catalina.Contained, org.apache.catalina.Lifecycle, org.apache.catalina.LifecycleListener, org.apache.catalina.Valve

      public class OAuthManagedResourceValve
      extends org.apache.catalina.authenticator.FormAuthenticator
      implements org.apache.catalina.LifecycleListener

  Web deployment whose security is managed by a remote OAuth Skeleton Key authentication server

  Redirects browser to remote authentication server if not logged in. Also allows OAuth Bearer Token requests that contain a Skeleton Key bearer tokens.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RealmConfiguration` | `realmConfiguration`
    `protected ManagedResourceConfig` | `remoteSkeletonKeyConfig`
    `protected ResourceMetadata` | `resourceMetadata`
    `protected UserSessionManagement` | `userSessionManagement`

    - ### Fields inherited from class org.apache.catalina.authenticator.FormAuthenticator

      `characterEncoding, info`

    - ### Fields inherited from class org.apache.catalina.authenticator.AuthenticatorBase

      `algorithm, cache, changeSessionIdOnAuthentication, context, DEFAULT_ALGORITHM, digest, disableProxyCaching, entropy, lifecycle, random, randomClass, securePagesWithPragma, SESSION_ID_BYTES, sm, sso, started`

    - ### Fields inherited from class org.apache.catalina.valves.ValveBase

      `container, containerLog, controller, domain, mserver, next, oname`

    - ### Fields inherited from interface org.apache.catalina.Lifecycle

      `AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuthManagedResourceValve()`

  - ### Method Summary

    Methods
    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()`

    - ### Methods inherited from class org.apache.catalina.authenticator.FormAuthenticator

      `forwardToErrorPage, forwardToLoginPage, getCharacterEncoding, getInfo, matchRequest, restoreRequest, savedRequestURL, saveRequest, setCharacterEncoding`

    - ### Methods inherited from class org.apache.catalina.authenticator.AuthenticatorBase

      `addLifecycleListener, associate, authenticate, findLifecycleListeners, generateSessionId, getAlgorithm, getCache, getContainer, getDigest, getDisableProxyCaching, getEntropy, getRandom, getRandomClass, getSecurePagesWithPragma, isChangeSessionIdOnAuthentication, login, logout, reauthenticateFromSSO, register, removeLifecycleListener, setAlgorithm, setCache, setChangeSessionIdOnAuthentication, setContainer, setDisableProxyCaching, setEntropy, setRandomClass, setSecurePagesWithPragma, stop, unregister`

    - ### Methods inherited from class org.apache.catalina.valves.ValveBase

      `backgroundProcess, createObjectName, event, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setController, setNext, setObjectName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### realmConfiguration

          protected RealmConfiguration realmConfiguration

    - #### userSessionManagement

          protected UserSessionManagement userSessionManagement

    - #### remoteSkeletonKeyConfig

          protected ManagedResourceConfig remoteSkeletonKeyConfig

    - #### resourceMetadata

          protected ResourceMetadata resourceMetadata

  - ### Constructor Detail

    - #### OAuthManagedResourceValve

          public OAuthManagedResourceValve()

  - ### Method Detail

    - #### start

          public void start()
                     throws org.apache.catalina.LifecycleException

      Specified by:
        `start` in interface `org.apache.catalina.Lifecycle`
      Overrides:
        `start` in class `org.apache.catalina.authenticator.AuthenticatorBase`
      Throws:
        `org.apache.catalina.LifecycleException`

    - #### lifecycleEvent

          public void lifecycleEvent(org.apache.catalina.LifecycleEvent event)

      Specified by:
        `lifecycleEvent` in interface `org.apache.catalina.LifecycleListener`

    - #### init

          protected void init()

    - #### invoke

          public void invoke(org.apache.catalina.connector.Request request,
                    org.apache.catalina.connector.Response response)
                      throws IOException,
                             javax.servlet.ServletException

      Specified by:
        `invoke` in interface `org.apache.catalina.Valve`
      Overrides:
        `invoke` in class `org.apache.catalina.authenticator.AuthenticatorBase`
      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### authenticate

          public boolean authenticate(org.apache.catalina.connector.Request request,
                             javax.servlet.http.HttpServletResponse response,
                             org.apache.catalina.deploy.LoginConfig config)
                               throws IOException

      Overrides:
        `authenticate` in class `org.apache.catalina.authenticator.FormAuthenticator`
      Throws:
        `IOException`

    - #### remoteLogout

          protected void remoteLogout(org.apache.catalina.connector.Request request,
                          javax.servlet.http.HttpServletResponse response)
                               throws IOException

      Throws:
        `IOException`

    - #### bearer

          protected boolean bearer(boolean challenge,
                       org.apache.catalina.connector.Request request,
                       javax.servlet.http.HttpServletResponse response)
                            throws LoginException,
                                   IOException

      Throws:
        `LoginException`
        `IOException`

    - #### checkLoggedIn

          protected boolean checkLoggedIn(org.apache.catalina.connector.Request request,
                              javax.servlet.http.HttpServletResponse response)

    - #### oauth

          protected void oauth(org.apache.catalina.connector.Request request,
                   javax.servlet.http.HttpServletResponse response)
                        throws IOException

      This method always set the HTTP response, so do not continue after invoking
      Throws:
        `IOException`

Copyright © 2014. All Rights Reserved.