Class SecurityInterceptor

java.lang.Object
org.pac4j.springframework.web.SecurityInterceptor
All Implemented Interfaces:
org.pac4j.core.util.security.SecurityEndpoint, org.springframework.web.servlet.HandlerInterceptor

public class SecurityInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor, org.pac4j.core.util.security.SecurityEndpoint

This interceptor protects an URL.

Since:
1.0.0
Author:
Jerome Leleu
  • Constructor Details

    • SecurityInterceptor

      public SecurityInterceptor()
      Empty constructor.
    • SecurityInterceptor

      public SecurityInterceptor(org.pac4j.core.config.Config config)
      Constructor.
      Parameters:
      config - the config
    • SecurityInterceptor

      public SecurityInterceptor(org.pac4j.core.config.Config config, String clients)
      Constructor.
      Parameters:
      config - the config
      clients - the clients
    • SecurityInterceptor

      public SecurityInterceptor(org.pac4j.core.config.Config config, String clients, String authorizers)
      Constructor.
      Parameters:
      config - the config
      clients - the clients
      authorizers - the authorizers
    • SecurityInterceptor

      public SecurityInterceptor(org.pac4j.core.config.Config config, String clients, String authorizers, String matchers)
      Constructor.
      Parameters:
      config - the config
      clients - the clients
      authorizers - the authorizers
      matchers - the matchers
  • Method Details

    • build

      public static SecurityInterceptor build(Object... parameters)
      Advanced builder.
      Parameters:
      parameters - the parameters
      Returns:
      the defined security interceptor
    • preHandle

      public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler)
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor