com.h3c.util.rs.auth

## Class AuthJerseyFilter

- java.lang.Object
- - com.h3c.util.rs.auth.AuthJerseyFilter

- All Implemented Interfaces:
    com.sun.jersey.spi.container.ContainerRequestFilter

      public class AuthJerseyFilter
      extends Object
      implements com.sun.jersey.spi.container.ContainerRequestFilter

  Simple Jersey JAX-RS authentication filter that permits only authenticated access for all paths that are not on the exclusion list.

  The filter takes a `exclude-paths` parameter whose value is expected to be an extended regular expression for matching paths that are exempt from the enforcement.

  If the filter receives an unauthenticated request that contains a token (which is inherently invalid), the request will not be allowed regardless of the exclusion list match.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `EXCLUDE_PATHS` Name of the parameter used to specify regular-expression for paths that should be excluded.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthJerseyFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.sun.jersey.spi.container.ContainerRequest` | `filter(com.sun.jersey.spi.container.ContainerRequest request)`

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

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

- - ### Field Detail

    - #### EXCLUDE_PATHS

          public static final String EXCLUDE_PATHS

      Name of the parameter used to specify regular-expression for paths that should be excluded.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AuthJerseyFilter

          public AuthJerseyFilter()

  - ### Method Detail

    - #### filter

          public com.sun.jersey.spi.container.ContainerRequest filter(com.sun.jersey.spi.container.ContainerRequest request)

      Specified by:
        `filter` in interface `com.sun.jersey.spi.container.ContainerRequestFilter`

Copyright © 2014. All Rights Reserved.