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). |
static IBMOAuthCredentials |
toIAMCredentials(IBMOAuthIdentity iamCredentialsIdentity)
Converts an
IBMOAuthIdentity to IBM credentials |
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 convertAwsCredentialspublic static IBMOAuthCredentials toIAMCredentials(IBMOAuthIdentity iamCredentialsIdentity)
IBMOAuthIdentity to IBM credentials
Usage of the new IBMOAuthIdentity type is preferred over IBM credentials. But some places may need to still convert to the older IBM credentials type to work with existing code.
iamCredentialsIdentity - The AwsCredentialsIdentity to convertAwsCredentialspublic 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 convertAwsCredentialsProviderCopyright © 2026. All rights reserved.