Interface TokenCredential

  • All Known Implementing Classes:
    BasicAuthenticationCredential
    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

        Mono<AccessToken> getToken​(TokenRequestContext request)
        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
        Returns:
        a Publisher that emits a single access token