Interface TokenManager<T extends TokenManager>

  • Type Parameters:
    T - The exact type of this token manager.
    All Known Implementing Classes:
    TokenManagerJWT, TokenManagerOpenIDConnect

    public interface TokenManager<T extends TokenManager>
    The TokenManager Interface. Before each request is sent to the Service, the TokenManager has the opportunity to modify the request and add any headers required for Authentication and Authorisation.
    Author:
    scf
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addAuthHeader​(org.apache.http.HttpRequest request)
      Add any headers to the request that are required Authentication and Authorisation.
      org.apache.http.impl.client.CloseableHttpClient getHttpClient()
      Get the HTTP client this TokenManager uses to fetch tokens.
      T setHttpClient​(org.apache.http.impl.client.CloseableHttpClient client)
      Set the HTTP client this TokenManager uses to fetch tokens.
    • Method Detail

      • addAuthHeader

        void addAuthHeader​(org.apache.http.HttpRequest request)
        Add any headers to the request that are required Authentication and Authorisation.
        Parameters:
        request - The request to modify.
      • setHttpClient

        T setHttpClient​(org.apache.http.impl.client.CloseableHttpClient client)
        Set the HTTP client this TokenManager uses to fetch tokens.
        Parameters:
        client - The CloseableHttpClient to use for fetching Tokens.
        Returns:
        this TokenManager
      • getHttpClient

        org.apache.http.impl.client.CloseableHttpClient getHttpClient()
        Get the HTTP client this TokenManager uses to fetch tokens.
        Returns:
        The HTTP client this TokenManager uses to fetch tokens.