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
RequestMatcher
that 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 String
X_REQUESTED_WITH_HEADER
protected static String
X_REQUESTED_WITH_HEADER_AJAX_VALUE
-
Constructor Summary
Constructors Constructor Description HttpHeaderInspectingApiRequestMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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:
matches
in interfaceorg.springframework.security.web.util.matcher.RequestMatcher
- Parameters:
request
- theHttpServletRequest
- Returns:
true
if the givenrequest
is an API request;false
otherwise
-
-