Package com.ibm.cloud.sdk.core.security
Class IamAuthenticator.Builder
- java.lang.Object
-
- com.ibm.cloud.sdk.core.security.IamAuthenticator.Builder
-
- Enclosing class:
- IamAuthenticator
public static class IamAuthenticator.Builder extends java.lang.ObjectThis Builder class is used to construct IamAuthenticator instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IamAuthenticator.Builderapikey(java.lang.String apikey)Sets the apikey property.IamAuthenticatorbuild()Constructs a new instance of IamAuthenticator from the builder's configuration.IamAuthenticator.BuilderclientId(java.lang.String clientId)Sets the clientId property.IamAuthenticator.BuilderclientSecret(java.lang.String clientSecret)Sets the clientSecret property.IamAuthenticator.BuilderdisableSSLVerification(boolean disableSSLVerification)Sets the disableSSLVerification property.IamAuthenticator.Builderheaders(java.util.Map<java.lang.String,java.lang.String> headers)Sets the headers property.IamAuthenticator.Builderproxy(java.net.Proxy proxy)Sets the proxy property.IamAuthenticator.BuilderproxyAuthenticator(okhttp3.Authenticator proxyAuthenticator)Sets the proxyAuthenticator property.IamAuthenticator.Builderscope(java.lang.String scope)Sets the scope property.IamAuthenticator.Builderurl(java.lang.String url)Sets the url property.
-
-
-
Method Detail
-
build
public IamAuthenticator build()
Constructs a new instance of IamAuthenticator from the builder's configuration.- Returns:
- the IamAuthenticator instance
-
apikey
public IamAuthenticator.Builder apikey(java.lang.String apikey)
Sets the apikey property.- Parameters:
apikey- the apikey to use when retrieving an access token- Returns:
- the Builder
-
url
public IamAuthenticator.Builder url(java.lang.String url)
Sets the url property.- Parameters:
url- the base url to use with the IAM token service- Returns:
- the Builder
-
clientId
public IamAuthenticator.Builder clientId(java.lang.String clientId)
Sets the clientId property.- Parameters:
clientId- the clientId to use when retrieving an access token- Returns:
- the Builder
-
clientSecret
public IamAuthenticator.Builder clientSecret(java.lang.String clientSecret)
Sets the clientSecret property.- Parameters:
clientSecret- the clientSecret to use when retrieving an access token- Returns:
- the Builder
-
scope
public IamAuthenticator.Builder scope(java.lang.String scope)
Sets the scope property.- Parameters:
scope- the scope to use when retrieving an access token- Returns:
- the Builder
-
disableSSLVerification
public IamAuthenticator.Builder disableSSLVerification(boolean disableSSLVerification)
Sets the disableSSLVerification property.- Parameters:
disableSSLVerification- a boolean flag indicating whether or not SSL verification should be disabled when interacting with the IAM token service- Returns:
- the Builder
-
headers
public IamAuthenticator.Builder headers(java.util.Map<java.lang.String,java.lang.String> headers)
Sets the headers property.- Parameters:
headers- the set of custom headers to include in requests sent to the IAM token service- Returns:
- the Builder
-
proxy
public IamAuthenticator.Builder proxy(java.net.Proxy proxy)
Sets the proxy property.- Parameters:
proxy- the java.net.Proxy instance to be used when interacting with the IAM token server- Returns:
- the Builder
-
proxyAuthenticator
public IamAuthenticator.Builder proxyAuthenticator(okhttp3.Authenticator proxyAuthenticator)
Sets the proxyAuthenticator property.- Parameters:
proxyAuthenticator- the okhttp3.Authenticator instance to be used with the proxy when interacting with the IAM token service- Returns:
- the Builder
-
-