Package org.pac4j.springframework.web
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 Summary
ConstructorsConstructorDescriptionEmpty constructor.SecurityInterceptor
(org.pac4j.core.config.Config config) Constructor.SecurityInterceptor
(org.pac4j.core.config.Config config, String clients) Constructor.SecurityInterceptor
(org.pac4j.core.config.Config config, String clients, String authorizers) Constructor.SecurityInterceptor
(org.pac4j.core.config.Config config, String clients, String authorizers, String matchers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityInterceptor
Advanced builder.boolean
preHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
Methods inherited from interface org.pac4j.core.util.security.SecurityEndpoint
setAuthorizers, setClients, setConfig, setMatchers
-
Constructor Details
-
SecurityInterceptor
public SecurityInterceptor()Empty constructor. -
SecurityInterceptor
public SecurityInterceptor(org.pac4j.core.config.Config config) Constructor.- Parameters:
config
- the config
-
SecurityInterceptor
Constructor.- Parameters:
config
- the configclients
- the clients
-
SecurityInterceptor
Constructor.- Parameters:
config
- the configclients
- the clientsauthorizers
- the authorizers
-
SecurityInterceptor
public SecurityInterceptor(org.pac4j.core.config.Config config, String clients, String authorizers, String matchers) Constructor.- Parameters:
config
- the configclients
- the clientsauthorizers
- the authorizersmatchers
- the matchers
-
-
Method Details
-
build
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 interfaceorg.springframework.web.servlet.HandlerInterceptor
-