Class ManagedIdentityTokenProvider


  • public class ManagedIdentityTokenProvider
    extends TokenProvider
    This is a token provider that obtains token using Managed Identity(MI). This token provider automatically detects MI settings.
    Since:
    1.2.0
    • Constructor Detail

      • ManagedIdentityTokenProvider

        public ManagedIdentityTokenProvider()
    • Method Detail

      • getSecurityTokenAsync

        public CompletableFuture<SecurityToken> getSecurityTokenAsync​(String audience)
        Description copied from class: TokenProvider
        Asynchronously gets a security token for the given audience. Implementations of this method may choose to create a new token for every call or return a cached token. But the token returned must be valid.
        Specified by:
        getSecurityTokenAsync in class TokenProvider
        Parameters:
        audience - path of the entity for which this security token is to be presented
        Returns:
        an instance of CompletableFuture which returns a SecurityToken on completion.