org.jboss.resteasy.auth.oauth

## Class OAuthFilter

- java.lang.Object
- - org.jboss.resteasy.auth.oauth.OAuthFilter

- All Implemented Interfaces:
    javax.servlet.Filter
  Direct Known Subclasses:
    MyFilter

      public class OAuthFilter
      extends Object
      implements javax.servlet.Filter

  OAuth Servlet Filter that interprets OAuth Authentication messages to set the Principal and roles for protected resources.
  Author:
    Stéphane Épardaud

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `OAUTH_AUTH_METHOD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuthFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)`
    `protected javax.servlet.http.HttpServletRequest` | `createSecurityContext(javax.servlet.http.HttpServletRequest request, OAuthConsumer consumer, OAuthToken accessToken)`
    `void` | `destroy()`
    `void` | `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)`
    `protected OAuthProvider` | `getProvider()`
    `void` | `init(javax.servlet.FilterConfig config)`

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

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

- - ### Field Detail

    - #### OAUTH_AUTH_METHOD

          public static final String OAUTH_AUTH_METHOD

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### OAuthFilter

          public OAuthFilter()

  - ### Method Detail

    - #### init

          public void init(javax.servlet.FilterConfig config)
                    throws javax.servlet.ServletException

      Specified by:
        `init` in interface `javax.servlet.Filter`
      Throws:
        `javax.servlet.ServletException`

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `javax.servlet.Filter`

    - #### doFilter

          public void doFilter(javax.servlet.ServletRequest request,
                      javax.servlet.ServletResponse response,
                      javax.servlet.FilterChain filterChain)
                        throws IOException,
                               javax.servlet.ServletException

      Specified by:
        `doFilter` in interface `javax.servlet.Filter`
      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### _doFilter

          protected void _doFilter(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       javax.servlet.FilterChain filterChain)
                            throws IOException,
                                   javax.servlet.ServletException

      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### getProvider

          protected OAuthProvider getProvider()

    - #### createSecurityContext

          protected javax.servlet.http.HttpServletRequest createSecurityContext(javax.servlet.http.HttpServletRequest request,
                                                                    OAuthConsumer consumer,
                                                                    OAuthToken accessToken)

Copyright © 2014. All Rights Reserved.