Class KeycloakClientRequestFactory
java.lang.Object
org.springframework.http.client.HttpComponentsClientHttpRequestFactory
org.keycloak.adapters.springsecurity.client.KeycloakClientRequestFactory
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.http.client.ClientHttpRequestFactory
@Component
@Scope("prototype")
public class KeycloakClientRequestFactory
extends org.springframework.http.client.HttpComponentsClientHttpRequestFactory
implements org.springframework.http.client.ClientHttpRequestFactory
Factory for
ClientHttpRequest
objects created for server to server secured
communication using OAuth2 bearer tokens issued by Keycloak.- Version:
- $Revision: 1 $
- Author:
- Scott Rossillo
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected KeycloakSecurityContext
protected void
postProcessHttpRequest
(org.apache.http.client.methods.HttpUriRequest request) Methods inherited from class org.springframework.http.client.HttpComponentsClientHttpRequestFactory
createHttpContext, createHttpUriRequest, createRequest, createRequestConfig, destroy, getHttpClient, mergeRequestConfig, setBufferRequestBody, setConnectionRequestTimeout, setConnectTimeout, setHttpClient, setHttpContextFactory, setReadTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.client.ClientHttpRequestFactory
createRequest
-
Field Details
-
AUTHORIZATION_HEADER
- See Also:
-
-
Constructor Details
-
KeycloakClientRequestFactory
public KeycloakClientRequestFactory()
-
-
Method Details
-
postProcessHttpRequest
protected void postProcessHttpRequest(org.apache.http.client.methods.HttpUriRequest request) - Overrides:
postProcessHttpRequest
in classorg.springframework.http.client.HttpComponentsClientHttpRequestFactory
-
getKeycloakSecurityContext
- Returns:
- the current
KeycloakSecurityContext
-