Interface TokenCredential

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TokenCredential
    The interface for credentials that can provide a token.
    • Method Detail

      • getToken

        void getToken​(TokenRequestContext request,
                      TokenCredential.TokenCredentialCallback callback)
        Asynchronously get a token for a given resource/audience. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing.
        Parameters:
        request - the details of the token request
        callback - the callback to receive the token retrieval result.