Class KeycloakConfiguration.AuthenticationTokenInterceptor

  • All Implemented Interfaces:
    org.springframework.http.client.ClientHttpRequestInterceptor
    Enclosing class:
    KeycloakConfiguration

    public class KeycloakConfiguration.AuthenticationTokenInterceptor
    extends Object
    implements org.springframework.http.client.ClientHttpRequestInterceptor
    • Field Detail

      • tokenRestTemplate

        protected final org.springframework.web.client.RestTemplate tokenRestTemplate
    • Constructor Detail

      • AuthenticationTokenInterceptor

        public AuthenticationTokenInterceptor()
    • Method Detail

      • intercept

        public org.springframework.http.client.ClientHttpResponse intercept​(org.springframework.http.HttpRequest request,
                                                                            byte[] body,
                                                                            org.springframework.http.client.ClientHttpRequestExecution execution)
                                                                     throws IOException
        Specified by:
        intercept in interface org.springframework.http.client.ClientHttpRequestInterceptor
        Throws:
        IOException
      • getAccessTokenValue

        public String getAccessTokenValue()
      • hasTokenExpired

        protected boolean hasTokenExpired()