Class HttpHeaderInspectingApiRequestMatcher
- java.lang.Object
-
- org.keycloak.adapters.springsecurity.authentication.HttpHeaderInspectingApiRequestMatcher
-
- All Implemented Interfaces:
org.springframework.security.web.util.matcher.RequestMatcher
public class HttpHeaderInspectingApiRequestMatcher extends Object implements org.springframework.security.web.util.matcher.RequestMatcher
RequestMatcherthat determines if a given request is an API request or an interactive login request.- Author:
- Scott Rossillo
- See Also:
RequestMatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringX_REQUESTED_WITH_HEADERprotected static StringX_REQUESTED_WITH_HEADER_AJAX_VALUE
-
Constructor Summary
Constructors Constructor Description HttpHeaderInspectingApiRequestMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(javax.servlet.http.HttpServletRequest request)Returns true if the given request is an API request or false if it's an interactive login request.
-
-
-
Field Detail
-
X_REQUESTED_WITH_HEADER
protected static final String X_REQUESTED_WITH_HEADER
- See Also:
- Constant Field Values
-
X_REQUESTED_WITH_HEADER_AJAX_VALUE
protected static final String X_REQUESTED_WITH_HEADER_AJAX_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
matches
public boolean matches(javax.servlet.http.HttpServletRequest request)
Returns true if the given request is an API request or false if it's an interactive login request.- Specified by:
matchesin interfaceorg.springframework.security.web.util.matcher.RequestMatcher- Parameters:
request- theHttpServletRequest- Returns:
trueif the givenrequestis an API request;falseotherwise
-
-