diff --git a/docs/TokenCredentialAuthenticationProvider.md b/docs/TokenCredentialAuthenticationProvider.md index 43de78aa1..f48394460 100644 --- a/docs/TokenCredentialAuthenticationProvider.md +++ b/docs/TokenCredentialAuthenticationProvider.md @@ -16,6 +16,7 @@ // Import the TokenCredential class that you wish to use. This example uses a Client SecretCredential import { ClientSecretCredential } from "@azure/identity"; +import { Client } from "@microsoft/microsoft-graph-client"; import { TokenCredentialAuthenticationProvider, TokenCredentialAuthenticationProviderOptions } from "@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials"; // Create an instance of the TokenCredential class that is imported diff --git a/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts b/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts index 09b3b0995..c07ffb1bd 100644 --- a/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts +++ b/src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts @@ -11,8 +11,8 @@ import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOpti /** * @interface * A signature represents the Authentication provider options for Token Credentials - * @property {getTokenoptions} [GetTokenOptions] - Defines options for TokenCredential.getToken. + * @property {getTokenOptions} [GetTokenOptions] - Defines options for TokenCredential.getToken. */ export interface TokenCredentialAuthenticationProviderOptions extends AuthenticationProviderOptions { - getTokenoptions?: GetTokenOptions; + getTokenOptions?: GetTokenOptions; } diff --git a/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts b/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts index 7d9d1faab..9e4b63bf5 100644 --- a/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts +++ b/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts @@ -70,7 +70,7 @@ export class TokenCredentialAuthenticationProvider implements AuthenticationProv error.message = "Scopes cannot be empty, Please provide scopes"; throw error; } - const response = await this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenoptions); + const response = await this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenOptions); if (response) { return response.token; } diff --git a/test/node/authentication/TokenCredentialAuthenticationProvider.ts b/test/node/authentication/TokenCredentialAuthenticationProvider.ts index 4a1183d15..31fff68cd 100644 --- a/test/node/authentication/TokenCredentialAuthenticationProvider.ts +++ b/test/node/authentication/TokenCredentialAuthenticationProvider.ts @@ -23,7 +23,7 @@ describe("TokenCredentialAuthenticationProvider.ts", () => { } const authProviderOptions: TokenCredentialAuthenticationProviderOptions = { - getTokenoptions: null, + getTokenOptions: null, scopes, }; const accessToken: AccessToken = { token: "dummy_valid_token", expiresOnTimestamp: 1 }; @@ -43,7 +43,7 @@ describe("TokenCredentialAuthenticationProvider.ts", () => { throw new Error("Method definition for getToken is not found"); } const authProviderOptions: TokenCredentialAuthenticationProviderOptions = { - getTokenoptions: null, + getTokenOptions: null, scopes, }; const accessToken: AccessToken = undefined;