public class SecurityInterceptor
extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
This interceptor protects an url, based on the securityLogic.
The configuration can be provided via contructors or setter methods: setConfig(Config) (the security configuration),
setClients(String) (list of clients for authentication), setAuthorizers(String) (list of authorizers),
setMatchers(String) (list of matchers) and setMultiProfile(Boolean) (whether multiple profiles should be kept).
| Constructor and Description |
|---|
SecurityInterceptor(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) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthorizers() |
String |
getClients() |
org.pac4j.core.config.Config |
getConfig() |
String |
getMatchers() |
Boolean |
getMultiProfile() |
org.pac4j.core.engine.SecurityLogic<Boolean,org.pac4j.core.context.J2EContext> |
getSecurityLogic() |
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler) |
void |
setAuthorizers(String authorizers) |
void |
setClients(String clients) |
void |
setConfig(org.pac4j.core.config.Config config) |
void |
setMatchers(String matchers) |
void |
setMultiProfile(Boolean multiProfile) |
void |
setSecurityLogic(org.pac4j.core.engine.SecurityLogic<Boolean,org.pac4j.core.context.J2EContext> securityLogic) |
public SecurityInterceptor(org.pac4j.core.config.Config config)
public SecurityInterceptor(org.pac4j.core.config.Config config,
String clients)
public SecurityInterceptor(org.pac4j.core.config.Config config,
String clients,
String authorizers)
public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws Exception
preHandle in interface org.springframework.web.servlet.HandlerInterceptorpreHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapterExceptionpublic org.pac4j.core.engine.SecurityLogic<Boolean,org.pac4j.core.context.J2EContext> getSecurityLogic()
public void setSecurityLogic(org.pac4j.core.engine.SecurityLogic<Boolean,org.pac4j.core.context.J2EContext> securityLogic)
public String getClients()
public void setClients(String clients)
public String getAuthorizers()
public void setAuthorizers(String authorizers)
public String getMatchers()
public void setMatchers(String matchers)
public Boolean getMultiProfile()
public void setMultiProfile(Boolean multiProfile)
public org.pac4j.core.config.Config getConfig()
public void setConfig(org.pac4j.core.config.Config config)
Copyright © 2018. All rights reserved.