Class CachedCredentials
- java.lang.Object
-
- com.boomi.connector.util.ConnectorCache<String>
-
- com.boomi.common.rest.rolesanywhere.CachedCredentials
-
public class CachedCredentials extends ConnectorCache<String>
Wrapper class for storing AWS Temporary credentials in the connector cache. The expiration date is verified whenisValid()is invoked.
-
-
Constructor Summary
Constructors Constructor Description CachedCredentials(com.boomi.common.aws.rolesanywhere.RolesAnywhereConfig config, com.boomi.common.aws.rolesanywhere.response.TemporaryCredentials credentials)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringbuildKey(com.boomi.common.aws.rolesanywhere.RolesAnywhereConfig config)Generates a key based on aRolesAnywhereConfigrepresenting a connection that uses IAM Roles Anywhere authentication.com.boomi.common.aws.rolesanywhere.response.TemporaryCredentialsgetTempCredentials()booleanisValid()Verifies if the credentials are valid based on their expiration time.-
Methods inherited from class com.boomi.connector.util.ConnectorCache
clearCache, getCache, getKey
-
-
-
-
Method Detail
-
buildKey
public static String buildKey(com.boomi.common.aws.rolesanywhere.RolesAnywhereConfig config)
Generates a key based on aRolesAnywhereConfigrepresenting a connection that uses IAM Roles Anywhere authentication.- Parameters:
config- the AWS Roles Anywhere configuration- Returns:
- key identifier for the provided config
-
isValid
public boolean isValid()
Verifies if the credentials are valid based on their expiration time. Credentials that expire in less than 60 seconds are considered invalid.- Overrides:
isValidin classConnectorCache<String>- Returns:
trueif the contained credentials are not expired,falseotherwise
-
getTempCredentials
public com.boomi.common.aws.rolesanywhere.response.TemporaryCredentials getTempCredentials()
-
-