Class KeycloakSecurityContextClientRequestInterceptor

  • All Implemented Interfaces:
    org.springframework.http.client.ClientHttpRequestInterceptor

    public class KeycloakSecurityContextClientRequestInterceptor
    extends Object
    implements org.springframework.http.client.ClientHttpRequestInterceptor
    Interceptor for ClientHttpRequestExecution objects created for server to server secured communication using OAuth2 bearer tokens issued by Keycloak.
    Version:
    $Revision: 1 $
    Author:
    James McShane
    • Constructor Detail

      • KeycloakSecurityContextClientRequestInterceptor

        public KeycloakSecurityContextClientRequestInterceptor()
    • Method Detail

      • intercept

        public org.springframework.http.client.ClientHttpResponse intercept​(org.springframework.http.HttpRequest httpRequest,
                                                                            byte[] bytes,
                                                                            org.springframework.http.client.ClientHttpRequestExecution clientHttpRequestExecution)
                                                                     throws IOException
        Specified by:
        intercept in interface org.springframework.http.client.ClientHttpRequestInterceptor
        Throws:
        IOException