Class AuthenticationPolicy

java.lang.Object
com.oracle.content.sdk.AuthenticationPolicy
Direct Known Subclasses:
AuthenticationBasicAuth, AuthenticationChannelTokenPolicy

public abstract class AuthenticationPolicy extends Object
Abstract Authentication policy defines the authentication information used for the SDK. For the ContentDeliveryClient, there is currently only AuthenticationChannelTokenPolicy used for authentication.
  • Field Details

    • userAgentHeader

      protected String userAgentHeader
  • Constructor Details

    • AuthenticationPolicy

      public AuthenticationPolicy()
  • Method Details

    • getInterceptor

      protected okhttp3.Interceptor getInterceptor()
      Get the okhttp interceptor to use for authentication
      Returns:
      interceptor
    • getAuthHeader

      public String getAuthHeader()
      Returns the authorization header to add for each request. By default returns null unless overridden.
      Returns:
      null, unless overridden
    • setUserAgentHeader

      public void setUserAgentHeader(String userAgentHeader)
      Set the User-Agent header to send for each request
      Parameters:
      userAgentHeader - User-Agent header value
    • addQueryParameters

      public void addQueryParameters(okhttp3.HttpUrl.Builder builder)
      Pass in the builder to add query parameters to every request. By default will not add any query parameters unless overridden.
      Parameters:
      builder - Builder class to add query parameters