Class JavaCredentialsProviderImpl
- java.lang.Object
-
- com.amazonaws.kinesisvideo.auth.AbstractKinesisVideoCredentialsProvider
-
- com.amazonaws.kinesisvideo.java.auth.JavaCredentialsProviderImpl
-
- All Implemented Interfaces:
KinesisVideoCredentialsProvider
public class JavaCredentialsProviderImpl extends AbstractKinesisVideoCredentialsProvider
Implementation of the AWS Credentials Provider wrapper for Java
-
-
Constructor Summary
Constructors Constructor Description JavaCredentialsProviderImpl(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider)Constructor for non-temporary credential provider.JavaCredentialsProviderImpl(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, long rotationPeriodInMillis)Constructor for temporary credential provider with token rotation period (has a session token) (i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected KinesisVideoCredentialsupdateCredentials()-
Methods inherited from class com.amazonaws.kinesisvideo.auth.AbstractKinesisVideoCredentialsProvider
getCredentials, getUpdatedCredentials
-
-
-
-
Constructor Detail
-
JavaCredentialsProviderImpl
public JavaCredentialsProviderImpl(@Nonnull com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider)
Constructor for non-temporary credential provider. Access Key ID + Secret Key (no session token). Also known as long-lived credentials. Not recommended for production use.- Parameters:
awsCredentialsProvider- credential provider- See Also:
- Using AWS access keys to authenticate AWS SDKs and tools
-
JavaCredentialsProviderImpl
public JavaCredentialsProviderImpl(@Nonnull com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, long rotationPeriodInMillis)
Constructor for temporary credential provider with token rotation period (has a session token) (i.e. token expires for every 5 minutes). The KVS Producer client will refresh the credentials based on the provider's configured rotation interval. During client initialization, the Producer client fetches the latest credentials once, and then everyrotationPeriodinterval afterward.- Parameters:
awsCredentialsProvider- AWS credentials provider to userotationPeriodInMillis- Token expires periodically for every rotationPeriodInMillis milliseconds. It is important to configure the rotationPeriod to be less than the AWS-configured expiration time (e.g. role duration seconds) to prevent the client from using stale credentials during API operations.- See Also:
updateCredentials()
-
-
Method Detail
-
updateCredentials
@Nonnull protected KinesisVideoCredentials updateCredentials()
- Specified by:
updateCredentialsin classAbstractKinesisVideoCredentialsProvider
-
-