Skip to content

Commit 61881e0

Browse files
authored
Removing implicitmsal (#485)
1 parent 91ef52b commit 61881e0

13 files changed

+12
-350
lines changed

authProviderOptions/es/msal/index.ts

-9
This file was deleted.

authProviderOptions/msal/index.ts

-8
This file was deleted.

docs/ImplicitMSALAuthenticationProvider.md

-56
This file was deleted.

lib/.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.npmignore
2+
test/
3+
**/*.tsbuildinfo
4+
es/test/

package.json

-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
"karma-typescript": "^5.2.0",
105105
"lint-staged": "^11.0.0",
106106
"mocha": "^6.2.3",
107-
"msal": "^1.0.0",
108107
"nyc": "^15.1.0",
109108
"prettier": "^1.17.0",
110109
"rollup": "^2.36.2",
@@ -123,9 +122,6 @@
123122
"buffer": {
124123
"optional": true
125124
},
126-
"msal": {
127-
"optional": true
128-
},
129125
"stream-browserify": {
130126
"optional": true
131127
},

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const copyRight = `/**
1919

2020
const config = [
2121
{
22-
input: ["lib/es/src/browser/rollupEntry.js"],
22+
input: ["lib/es/src/browser/index.js"],
2323
output: {
2424
file: "lib/graph-js-sdk.js",
2525
format: "iife",

src/authentication/msal/ImplicitMSALAuthenticationProvider.ts

-99
This file was deleted.

src/authentication/msalOptions/MSALAuthenticationProviderOptions.ts

+1-29
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,8 @@ import { AccountInfo, InteractionType } from "@azure/msal-browser";
1313

1414
import { AuthenticationProviderOptions } from "../../IAuthenticationProviderOptions";
1515

16-
/**
17-
* @deprecated
18-
* @class
19-
* @implements AuthenticationProviderOptions
20-
* Class representing MSALAuthenticationProviderOptions
21-
*/
22-
export class MSALAuthenticationProviderOptions implements AuthenticationProviderOptions {
23-
/**
24-
* @public
25-
* A member holding array of scopes
26-
*/
27-
public scopes: string[];
28-
29-
/**
30-
* @public
31-
* @constructor
32-
* To create an instance of MSALAuthenticationProviderOptions
33-
* @param {string[]} scopes - An array of scopes
34-
* @returns An instance of MSALAuthenticationProviderOptions
35-
*/
36-
public constructor(scopes: string[]) {
37-
this.scopes = scopes;
38-
}
39-
}
40-
41-
export interface MSALAuthenticationProviderSharedOptions extends AuthenticationProviderOptions {
16+
export interface AuthCodeMSALBrowserAuthenticationProviderOptions extends AuthenticationProviderOptions {
4217
scopes: string[];
43-
}
44-
45-
export interface AuthCodeMSALBrowserAuthenticationProviderOptions extends MSALAuthenticationProviderSharedOptions {
4618
account: AccountInfo;
4719
interactionType: InteractionType;
4820
}

src/browser/ImplicitMSALAuthenticationProvider.ts

-103
This file was deleted.

src/browser/rollupEntry.ts

-15
This file was deleted.

test/common/middleware/AuthenticationHandlerOptions.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@
77

88
import { assert } from "chai";
99

10-
import { MSALAuthenticationProviderOptions } from "../../../src/authentication/msalOptions/MSALAuthenticationProviderOptions";
1110
import { AuthenticationHandlerOptions } from "../../../src/middleware/options/AuthenticationHandlerOptions";
1211
import { DummyAuthenticationProvider } from "../../DummyAuthenticationProvider";
1312

1413
describe("AuthenticationHandlerOptions.ts", () => {
1514
const dummyAuthProvider = new DummyAuthenticationProvider();
16-
const msalAuthProviderOptions = new MSALAuthenticationProviderOptions([]);
15+
const authOptions = { scopes: ["test"] };
1716
it("Should create an instance with all the given options", () => {
18-
const options = new AuthenticationHandlerOptions(dummyAuthProvider, msalAuthProviderOptions);
17+
const options = new AuthenticationHandlerOptions(dummyAuthProvider, authOptions);
1918
assert.equal(options.authenticationProvider, dummyAuthProvider);
20-
assert.equal(options.authenticationProviderOptions, msalAuthProviderOptions);
19+
assert.equal(options.authenticationProviderOptions, authOptions);
2120
});
2221

2322
it("Should be undefined value if no value is passed", () => {
24-
const options = new AuthenticationHandlerOptions(undefined, msalAuthProviderOptions);
23+
const options = new AuthenticationHandlerOptions(undefined, authOptions);
2524
assert.isUndefined(options.authenticationProvider);
26-
assert.equal(options.authenticationProviderOptions, msalAuthProviderOptions);
25+
assert.equal(options.authenticationProviderOptions, authOptions);
2726
});
2827
});

0 commit comments

Comments
 (0)