Package org.bgerp.app.servlet.filter

# Class AuthFilter

java.lang.Object
org.bgerp.app.servlet.filter.AuthFilter

All Implemented Interfaces:
  `javax.servlet.Filter`

public class AuthFilter extends Object implements javax.servlet.Filter
Servlet auth filter.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `REQUEST_ATTRIBUTE_USER_ID_NAME`
  `static final String`
  `REQUEST_ATTRIBUTE_USER_IP_ADDRESS_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AuthFilter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  `void`
  `doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)`
  `static final User`
  `getUser(javax.servlet.http.HttpServletRequest request)`
  Gets the current user, preserved in request's attribute.
  `void`
  `init(javax.servlet.FilterConfig filterConfig)`

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

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

- ## Field Details

  - ### REQUEST_ATTRIBUTE_USER_ID_NAME

    public static final String REQUEST_ATTRIBUTE_USER_ID_NAME
    See Also:
      - Constant Field Values

  - ### REQUEST_ATTRIBUTE_USER_IP_ADDRESS_NAME

    public static final String REQUEST_ATTRIBUTE_USER_IP_ADDRESS_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AuthFilter

    public AuthFilter()

- ## Method Details

  - ### init

    public void init(javax.servlet.FilterConfig filterConfig) 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 servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
    Specified by:
      `doFilter` in interface `javax.servlet.Filter`
    Throws:
      `IOException`
      `javax.servlet.ServletException`

  - ### getUser

    public static final User getUser(javax.servlet.http.HttpServletRequest request)
    Gets the current user, preserved in request's attribute.
    Parameters:
      `request` -
    Returns: