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
ConstructorDescriptionSecurityInterceptor
(org.pac4j.core.config.Config config) SecurityInterceptor
(org.pac4j.core.config.Config config, String clients) SecurityInterceptor
(org.pac4j.core.config.Config config, String clients, String authorizers) SecurityInterceptor
(org.pac4j.core.config.Config config, String clients, String authorizers, String matchers) -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityInterceptor
org.pac4j.core.config.Config
org.pac4j.core.http.adapter.HttpActionAdapter
org.pac4j.core.engine.SecurityLogic
boolean
preHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) void
setAuthorizers
(String authorizers) void
setClients
(String clients) void
setConfig
(org.pac4j.core.config.Config config) void
setHttpActionAdapter
(org.pac4j.core.http.adapter.HttpActionAdapter httpActionAdapter) void
setMatchers
(String matchers) void
setSecurityLogic
(org.pac4j.core.engine.SecurityLogic securityLogic) 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
-
Constructor Details
-
SecurityInterceptor
public SecurityInterceptor() -
SecurityInterceptor
public SecurityInterceptor(org.pac4j.core.config.Config config) -
SecurityInterceptor
-
SecurityInterceptor
-
SecurityInterceptor
-
-
Method Details
-
build
-
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
-
getSecurityLogic
public org.pac4j.core.engine.SecurityLogic getSecurityLogic() -
setSecurityLogic
public void setSecurityLogic(org.pac4j.core.engine.SecurityLogic securityLogic) - Specified by:
setSecurityLogic
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-
getClients
-
setClients
- Specified by:
setClients
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-
getAuthorizers
-
setAuthorizers
- Specified by:
setAuthorizers
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-
getMatchers
-
setMatchers
- Specified by:
setMatchers
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-
getConfig
public org.pac4j.core.config.Config getConfig() -
setConfig
public void setConfig(org.pac4j.core.config.Config config) - Specified by:
setConfig
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-
getHttpActionAdapter
public org.pac4j.core.http.adapter.HttpActionAdapter getHttpActionAdapter() -
setHttpActionAdapter
public void setHttpActionAdapter(org.pac4j.core.http.adapter.HttpActionAdapter httpActionAdapter) - Specified by:
setHttpActionAdapter
in interfaceorg.pac4j.core.util.security.SecurityEndpoint
-