Skip to content

Commit 49971f6

Browse files
authored
docs: add missing import (microsoftgraph#939)
* docs: add missing import * refactor: GetTokenOptions type
1 parent 01ccbca commit 49971f6

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

docs/TokenCredentialAuthenticationProvider.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// Import the TokenCredential class that you wish to use. This example uses a Client SecretCredential
1717

1818
import { ClientSecretCredential } from "@azure/identity";
19+
import { Client } from "@microsoft/microsoft-graph-client";
1920
import { TokenCredentialAuthenticationProvider, TokenCredentialAuthenticationProviderOptions } from "@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials";
2021

2122
// Create an instance of the TokenCredential class that is imported

src/authentication/azureTokenCredentials/ITokenCredentialAuthenticationProviderOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOpti
1111
/**
1212
* @interface
1313
* A signature represents the Authentication provider options for Token Credentials
14-
* @property {getTokenoptions} [GetTokenOptions] - Defines options for TokenCredential.getToken.
14+
* @property {getTokenOptions} [GetTokenOptions] - Defines options for TokenCredential.getToken.
1515
*/
1616
export interface TokenCredentialAuthenticationProviderOptions extends AuthenticationProviderOptions {
17-
getTokenoptions?: GetTokenOptions;
17+
getTokenOptions?: GetTokenOptions;
1818
}

src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class TokenCredentialAuthenticationProvider implements AuthenticationProv
7070
error.message = "Scopes cannot be empty, Please provide scopes";
7171
throw error;
7272
}
73-
const response = await this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenoptions);
73+
const response = await this.tokenCredential.getToken(scopes, this.authenticationProviderOptions.getTokenOptions);
7474
if (response) {
7575
return response.token;
7676
}

test/node/authentication/TokenCredentialAuthenticationProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("TokenCredentialAuthenticationProvider.ts", () => {
2323
}
2424

2525
const authProviderOptions: TokenCredentialAuthenticationProviderOptions = {
26-
getTokenoptions: null,
26+
getTokenOptions: null,
2727
scopes,
2828
};
2929
const accessToken: AccessToken = { token: "dummy_valid_token", expiresOnTimestamp: 1 };
@@ -43,7 +43,7 @@ describe("TokenCredentialAuthenticationProvider.ts", () => {
4343
throw new Error("Method definition for getToken is not found");
4444
}
4545
const authProviderOptions: TokenCredentialAuthenticationProviderOptions = {
46-
getTokenoptions: null,
46+
getTokenOptions: null,
4747
scopes,
4848
};
4949
const accessToken: AccessToken = undefined;

0 commit comments

Comments
 (0)