public final class CredentialUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isAnonymous(AwsCredentials credentials)
Determine whether the provided credentials are anonymous credentials, indicating that the customer is not attempting to
authenticate themselves.
|
static boolean |
isAnonymous(AwsCredentialsIdentity credentials)
Determine whether the provided credentials are anonymous credentials, indicating that the customer is not attempting to
authenticate themselves.
|
static AwsCredentials |
toCredentials(AwsCredentialsIdentity awsCredentialsIdentity)
Converts an
AwsCredentialsIdentity to AwsCredentials . |
static AwsCredentialsProvider |
toCredentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> identityProvider)
Converts an
extends AwsCredentialsIdentity> to AwsCredentialsProvider based on
toCredentials(AwsCredentialsIdentity) . |
public static boolean isAnonymous(AwsCredentials credentials)
public static boolean isAnonymous(AwsCredentialsIdentity credentials)
public static AwsCredentials toCredentials(AwsCredentialsIdentity awsCredentialsIdentity)
AwsCredentialsIdentity
to AwsCredentials
.
Usage of the new AwsCredentialsIdentity type is preferred over AwsCredentials. But some places may need to still convert to the older AwsCredentials type to work with existing code.
The conversion is only aware of AwsCredentialsIdentity
and AwsSessionCredentialsIdentity
types. If the
input is another sub-type that has other properties, they are not carried over. i.e.,
awsCredentialsIdentity
- The AwsCredentialsIdentity
to convertAwsCredentials
public static AwsCredentialsProvider toCredentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> identityProvider)
extends AwsCredentialsIdentity>
to AwsCredentialsProvider
based on
toCredentials(AwsCredentialsIdentity)
.
Usage of the new IdentityProvider type is preferred over AwsCredentialsProvider. But some places may need to still convert to the older AwsCredentialsProvider type to work with existing code.
identityProvider
- The extends AwsCredentialsIdentity>
to convertAwsCredentialsProvider
Copyright © 2023. All rights reserved.