From cc8c8fc663f5bb22b20c346dde4cac37ce9b1312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez?= Date: Tue, 29 Sep 2020 15:38:11 -0400 Subject: [PATCH] [Identity] Clearer message on the getToken methods (#11487) --- sdk/core/core-auth/src/tokenCredential.ts | 3 +++ .../identity/src/credentials/chainedTokenCredential.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sdk/core/core-auth/src/tokenCredential.ts b/sdk/core/core-auth/src/tokenCredential.ts index e19ab07f6300..20cc8e1487cf 100644 --- a/sdk/core/core-auth/src/tokenCredential.ts +++ b/sdk/core/core-auth/src/tokenCredential.ts @@ -11,6 +11,9 @@ export interface TokenCredential { /** * Gets the token provided by this credential. * + * 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. + * * @param scopes The list of scopes for which the token will have access. * @param options The options used to configure any requests this * TokenCredential implementation might make. diff --git a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts index 61b55985c0f0..98bf5375bca5 100644 --- a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts +++ b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts @@ -43,6 +43,9 @@ export class ChainedTokenCredential implements TokenCredential { * `TokenCredential` implementations. Throws an {@link AggregateAuthenticationError} * when one or more credentials throws an {@link AuthenticationError} and * no credentials have returned an access token. + * + * 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. * * @param scopes The list of scopes for which the token will have access. * @param options The options used to configure any requests this