public class DefaultTokenProvider extends Object implements TokenProvider
Modifier and Type | Field and Description |
---|---|
protected static InternalLogApi |
log |
Constructor and Description |
---|
DefaultTokenProvider(String apiKey)
Default implmentation will use the apiKey to retrieve the Token from the
IAM Service
|
Modifier and Type | Method and Description |
---|---|
Token |
retrieveToken()
Retrieve the token using the Apache httpclient in a synchronous manner
|
Token |
retrieveTokenWithRefresh(String refreshToken)
Retrieve a token using the refresh token instead of the IBM apiKey
|
void |
setHttpClientSettings(HttpClientSettings httpClientSettings)
Apply http Settings when available to match those set on the s3Client.
|
void |
setIamEndpoint(String iamEndpoint)
Overwrite the default IAM endpoint.
|
protected static final InternalLogApi log
public DefaultTokenProvider(String apiKey)
apiKey
- The IBM apiKeypublic void setIamEndpoint(String iamEndpoint)
iamEndpoint
- The http endpoint to retrieve the tokenpublic void setHttpClientSettings(HttpClientSettings httpClientSettings)
httpClientSettings
- public Token retrieveToken()
retrieveToken
in interface TokenProvider
Token
The IAM TokenCopyright © 2024. All rights reserved.