Class TokenUtils
- java.lang.Object
-
- software.amazon.awssdk.auth.credentials.TokenUtils
-
public final class TokenUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SdkToken
toSdkToken(TokenIdentity tokenIdentity)
Converts anTokenIdentity
toSdkToken
.static SdkTokenProvider
toSdkTokenProvider(IdentityProvider<? extends TokenIdentity> identityProvider)
-
-
-
Method Detail
-
toSdkToken
public static SdkToken toSdkToken(TokenIdentity tokenIdentity)
Converts anTokenIdentity
toSdkToken
.Usage of the new TokenIdentity type is preferred over SdkToken. But some places may need to still convert to the older SdkToken type to work with existing code.
The conversion is only aware of
TokenIdentity
interface. If the input is another sub-type that has other properties, they are not carried over.- Parameters:
tokenIdentity
- TheTokenIdentity
to convert- Returns:
- The corresponding
SdkToken
-
toSdkTokenProvider
public static SdkTokenProvider toSdkTokenProvider(IdentityProvider<? extends TokenIdentity> identityProvider)
Converts anIdentityProvider
toSdkTokenProvider
based ontoSdkToken(TokenIdentity)
.Usage of the new IdentityProvider type is preferred over SdkTokenProvider. But some places may need to still convert to the older SdkTokenProvider type to work with existing code.
- Parameters:
identityProvider
- TheIdentityProvider
to convert- Returns:
- The corresponding
SdkTokenProvider
-
-