public class JsonFileCredentialsProvider extends Object implements AWSCredentialsProvider
AWSCredentialsProvider
implementation that loads IBM security
credentials from a json file provided on initialization.
The IBM API key is expected to be in the apiKey
property and the IBM resource instance id is expected to be in the
resource_instance_id
property.
Constructor and Description |
---|
JsonFileCredentialsProvider(String credentialsFilePath)
Creates a new PropertiesFileCredentialsProvider that will attempt to load
a custom file from the path specified to read IBM security credentials.
|
Modifier and Type | Method and Description |
---|---|
AWSCredentials |
getCredentials()
Returns AWSCredentials which the caller can use to authorize an AWS request.
|
void |
refresh()
Forces this credentials provider to refresh its credentials.
|
String |
toString() |
public JsonFileCredentialsProvider(String credentialsFilePath)
credentialsFilePath
- The custom classpath resource path to a json file from
which the IBM security credentials should be loaded.
For example,
public AWSCredentials getCredentials()
AWSCredentialsProvider
getCredentials
in interface AWSCredentialsProvider
public void refresh()
AWSCredentialsProvider
refresh
in interface AWSCredentialsProvider
Copyright © 2024. All rights reserved.