Package org.pac4j.core.matching.checker
Class DefaultMatchingChecker
- java.lang.Object
-
- org.pac4j.core.matching.checker.DefaultMatchingChecker
-
- All Implemented Interfaces:
MatchingChecker
public class DefaultMatchingChecker extends java.lang.Object implements MatchingChecker
Default way to check the matchers (with default matchers).- Since:
- 4.0.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description protected static CacheControlMatcher
CACHE_CONTROL_MATCHER
protected static CorsMatcher
CORS_MATCHER
protected static CsrfTokenGeneratorMatcher
CSRF_TOKEN_MATCHER
protected static Matcher
DELETE_MATCHER
protected static Matcher
GET_MATCHER
protected static Matcher
POST_MATCHER
protected static Matcher
PUT_MATCHER
protected static StrictTransportSecurityMatcher
STRICT_TRANSPORT_MATCHER
protected static XContentTypeOptionsMatcher
X_CONTENT_TYPE_OPTIONS_MATCHER
protected static XFrameOptionsMatcher
X_FRAME_OPTIONS_MATCHER
protected static XSSProtectionMatcher
XSS_PROTECTION_MATCHER
-
Constructor Summary
Constructors Constructor Description DefaultMatchingChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<Matcher>
computeDefaultMatchers(WebContext context, SessionStore sessionStore, java.util.List<Client> clients)
protected java.util.List<Matcher>
computeMatchers(WebContext context, SessionStore sessionStore, java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap, java.util.List<Client> clients)
protected java.util.List<Matcher>
computeMatchersFromNames(java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap)
boolean
matches(WebContext context, SessionStore sessionStore, java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap, java.util.List<Client> clients)
Check if the web context matches.protected boolean
matches(WebContext context, SessionStore sessionStore, java.util.List<Matcher> matchers)
protected java.util.List<Matcher>
retrieveMatchers(java.lang.String matcherName, java.util.Map<java.lang.String,Matcher> matchersMap)
-
-
-
Field Detail
-
GET_MATCHER
protected static final Matcher GET_MATCHER
-
POST_MATCHER
protected static final Matcher POST_MATCHER
-
PUT_MATCHER
protected static final Matcher PUT_MATCHER
-
DELETE_MATCHER
protected static final Matcher DELETE_MATCHER
-
STRICT_TRANSPORT_MATCHER
protected static final StrictTransportSecurityMatcher STRICT_TRANSPORT_MATCHER
-
X_CONTENT_TYPE_OPTIONS_MATCHER
protected static final XContentTypeOptionsMatcher X_CONTENT_TYPE_OPTIONS_MATCHER
-
X_FRAME_OPTIONS_MATCHER
protected static final XFrameOptionsMatcher X_FRAME_OPTIONS_MATCHER
-
XSS_PROTECTION_MATCHER
protected static final XSSProtectionMatcher XSS_PROTECTION_MATCHER
-
CACHE_CONTROL_MATCHER
protected static final CacheControlMatcher CACHE_CONTROL_MATCHER
-
CSRF_TOKEN_MATCHER
protected static final CsrfTokenGeneratorMatcher CSRF_TOKEN_MATCHER
-
CORS_MATCHER
protected static final CorsMatcher CORS_MATCHER
-
-
Method Detail
-
matches
public boolean matches(WebContext context, SessionStore sessionStore, java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap, java.util.List<Client> clients)
Description copied from interface:MatchingChecker
Check if the web context matches.- Specified by:
matches
in interfaceMatchingChecker
- Parameters:
context
- the web contextsessionStore
- the session storematchersValue
- the matchersmatchersMap
- the map of matchersclients
- the clients- Returns:
- whether the web context matches
-
computeMatchers
protected java.util.List<Matcher> computeMatchers(WebContext context, SessionStore sessionStore, java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap, java.util.List<Client> clients)
-
computeDefaultMatchers
protected java.util.List<Matcher> computeDefaultMatchers(WebContext context, SessionStore sessionStore, java.util.List<Client> clients)
-
computeMatchersFromNames
protected java.util.List<Matcher> computeMatchersFromNames(java.lang.String matchersValue, java.util.Map<java.lang.String,Matcher> matchersMap)
-
retrieveMatchers
protected java.util.List<Matcher> retrieveMatchers(java.lang.String matcherName, java.util.Map<java.lang.String,Matcher> matchersMap)
-
matches
protected boolean matches(WebContext context, SessionStore sessionStore, java.util.List<Matcher> matchers)
-
-