From f7ce94d019f53839d946047b622e49385a5882ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez?= Date: Fri, 25 Sep 2020 00:42:09 -0400 Subject: [PATCH] [Identity] Clearer message on the getToken methods --- 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