Skip to content

Commit fe07204

Browse files
Renaming ImplicitMSALAuthenticationProviderOptions to MSALAuthenticationProviderOptions
1 parent 418c2a2 commit fe07204

8 files changed

Lines changed: 26 additions & 26 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes
7979
// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal
8080
// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication
8181
const msalInstance = new Msal.UserAgentApplication(msalConfig);
82-
const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes);
82+
const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);
8383
const authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, options);
8484
```
8585

@@ -108,7 +108,7 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes
108108
// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal
109109
// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication
110110
const msalInstance = new UserAgentApplication(msalConfig);
111-
const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes);
111+
const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);
112112
const authProvider = new ImplicitMSALAuthenticationProvider(msalInstance, options);
113113
```
114114

samples/browser/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const init = async () => {
1717
};
1818

1919
var msalInstance = new Msal.UserAgentApplication(msalConfig);
20-
const msalOptions = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(scopes);
20+
const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes);
2121
const msalProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, msalOptions);
2222
client = MicrosoftGraph.Client.initWithMiddleware({
2323
debugLogging: true,

spec/middleware/AuthenticationHandlerOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
import { assert } from "chai";
99

10-
import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions";
1110
import { AuthenticationHandlerOptions } from "../../src/middleware/options/AuthenticationHandlerOptions";
11+
import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions";
1212
import { DummyAuthenticationProvider } from "../DummyAuthenticationProvider";
1313

1414
describe("AuthenticationHandlerOptions.ts", () => {
1515
const dummyAuthProvider = new DummyAuthenticationProvider();
16-
const msalAuthProviderOptions = new ImplicitMSALAuthenticationProviderOptions([]);
16+
const msalAuthProviderOptions = new MSALAuthenticationProviderOptions([]);
1717
it("Should create an instance with all the given options", () => {
1818
const options = new AuthenticationHandlerOptions(dummyAuthProvider, msalAuthProviderOptions);
1919
assert.equal(options.authenticationProvider, dummyAuthProvider);

spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts renamed to spec/middleware/MSALAuthenticationProviderOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import { assert } from "chai";
99

10-
import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions";
10+
import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions";
1111

12-
describe("ImplicitMSALAuthenticationProviderOptions.ts", () => {
12+
describe("MSALAuthenticationProviderOptions.ts", () => {
1313
it("Should create an instance with all the given options", () => {
1414
const scopes = ["dummy.scope"];
15-
const options = new ImplicitMSALAuthenticationProviderOptions(scopes);
15+
const options = new MSALAuthenticationProviderOptions(scopes);
1616
assert.isDefined(options.scopes);
1717
assert.equal(options.scopes, scopes);
1818
});

src/ImplicitMSALAuthenticationProvider.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { AuthenticationParameters, AuthResponse, InteractionRequiredAuthError, U
1313

1414
import { AuthenticationProvider } from "./IAuthenticationProvider";
1515
import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions";
16-
import { ImplicitMSALAuthenticationProviderOptions } from "./ImplicitMSALAuthenticationProviderOptions";
16+
import { MSALAuthenticationProviderOptions } from "./MSALAuthenticationProviderOptions";
1717

1818
/**
1919
* @class
@@ -23,9 +23,9 @@ import { ImplicitMSALAuthenticationProviderOptions } from "./ImplicitMSALAuthent
2323
export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider {
2424
/**
2525
* @private
26-
* A member holding an instance of ImplicitMSALAuthenticationProviderOptions
26+
* A member holding an instance of MSALAuthenticationProviderOptions
2727
*/
28-
private options: ImplicitMSALAuthenticationProviderOptions;
28+
private options: MSALAuthenticationProviderOptions;
2929

3030
/**
3131
* @private
@@ -38,10 +38,10 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide
3838
* @constructor
3939
* Creates an instance of ImplicitMSALAuthenticationProvider
4040
* @param {UserAgentApplication} msalInstance - An instance of MSAL UserAgentApplication
41-
* @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions
41+
* @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions
4242
* @returns An instance of ImplicitMSALAuthenticationProvider
4343
*/
44-
public constructor(msalInstance: UserAgentApplication, options: ImplicitMSALAuthenticationProviderOptions) {
44+
public constructor(msalInstance: UserAgentApplication, options: MSALAuthenticationProviderOptions) {
4545
this.options = options;
4646
this.msalInstance = msalInstance;
4747
}
@@ -54,7 +54,7 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide
5454
* @returns The promise that resolves to an access token
5555
*/
5656
public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise<string> {
57-
const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions;
57+
const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions;
5858
let scopes: string[];
5959
if (typeof options !== "undefined") {
6060
scopes = options.scopes;

src/ImplicitMSALAuthenticationProviderOptions.ts renamed to src/MSALAuthenticationProviderOptions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
*/
77

88
/**
9-
* @module ImplicitMSALAuthenticationProviderOptions
9+
* @module MSALAuthenticationProviderOptions
1010
*/
1111

1212
import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions";
1313

1414
/**
1515
* @class
1616
* @implements AuthenticationProviderOptions
17-
* Class representing ImplicitMSALAuthenticationProviderOptions
17+
* Class representing MSALAuthenticationProviderOptions
1818
*/
19-
export class ImplicitMSALAuthenticationProviderOptions implements AuthenticationProviderOptions {
19+
export class MSALAuthenticationProviderOptions implements AuthenticationProviderOptions {
2020
/**
2121
* @public
2222
* A member holding array of scopes
@@ -26,9 +26,9 @@ export class ImplicitMSALAuthenticationProviderOptions implements Authentication
2626
/**
2727
* @public
2828
* @constructor
29-
* To create an instance of ImplicitMSALAuthenticationProviderOptions
29+
* To create an instance of MSALAuthenticationProviderOptions
3030
* @param {string[]} scopes - An array of scopes
31-
* @returns An instance of ImplicitMSALAuthenticationProviderOptions
31+
* @returns An instance of MSALAuthenticationProviderOptions
3232
*/
3333
public constructor(scopes: string[]) {
3434
this.scopes = scopes;

src/browser/ImplicitMSALAuthenticationProvider.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import { AuthenticationProvider } from "../IAuthenticationProvider";
1313
import { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions";
14-
import { ImplicitMSALAuthenticationProviderOptions } from "../ImplicitMSALAuthenticationProviderOptions";
14+
import { MSALAuthenticationProviderOptions } from "../MSALAuthenticationProviderOptions";
1515

1616
/**
1717
* @constant
@@ -27,9 +27,9 @@ declare const Msal: any;
2727
export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider {
2828
/**
2929
* @private
30-
* A member holding an instance of ImplicitMSALAuthenticationProviderOptions
30+
* A member holding an instance of MSALAuthenticationProviderOptions
3131
*/
32-
private options: ImplicitMSALAuthenticationProviderOptions;
32+
private options: MSALAuthenticationProviderOptions;
3333

3434
/**
3535
* @private
@@ -42,10 +42,10 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide
4242
* @constructor
4343
* Creates an instance of ImplicitMSALAuthenticationProvider
4444
* @param {any} msalInstance - An instance of MSAL UserAgentApplication
45-
* @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions
45+
* @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions
4646
* @returns An instance of ImplicitMSALAuthenticationProvider
4747
*/
48-
public constructor(msalInstance: any, options: ImplicitMSALAuthenticationProviderOptions) {
48+
public constructor(msalInstance: any, options: MSALAuthenticationProviderOptions) {
4949
this.options = options;
5050
this.msalInstance = msalInstance;
5151
}
@@ -58,7 +58,7 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide
5858
* @returns The promise that resolves to an access token
5959
*/
6060
public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise<string> {
61-
const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions;
61+
const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions;
6262
let scopes: string[];
6363
if (typeof options !== "undefined") {
6464
scopes = options.scopes;

src/browser/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export * from "../IFetchOptions";
3636
export * from "../IGraphRequestCallback";
3737
export * from "../IOptions";
3838
export * from "./ImplicitMSALAuthenticationProvider";
39-
export * from "../ImplicitMSALAuthenticationProviderOptions";
39+
export * from "../MSALAuthenticationProviderOptions";
4040
export * from "../ResponseType";

0 commit comments

Comments
 (0)