Package com.oracle.content.sdk
Class AuthenticationPolicy
java.lang.Object
com.oracle.content.sdk.AuthenticationPolicy
- Direct Known Subclasses:
AuthenticationBasicAuth
,AuthenticationChannelTokenPolicy
Abstract Authentication policy defines the authentication information used
for the SDK. For the
ContentDeliveryClient
, there is currently
only AuthenticationChannelTokenPolicy
used for authentication.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addQueryParameters
(okhttp3.HttpUrl.Builder builder) Pass in the builder to add query parameters to every request.Returns the authorization header to add for each request.protected okhttp3.Interceptor
Get the okhttp interceptor to use for authenticationvoid
setUserAgentHeader
(String userAgentHeader) Set the User-Agent header to send for each request
-
Field Details
-
userAgentHeader
-
-
Constructor Details
-
AuthenticationPolicy
public AuthenticationPolicy()
-
-
Method Details
-
getInterceptor
protected okhttp3.Interceptor getInterceptor()Get the okhttp interceptor to use for authentication- Returns:
- interceptor
-
getAuthHeader
Returns the authorization header to add for each request. By default returns null unless overridden.- Returns:
- null, unless overridden
-
setUserAgentHeader
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
-