File tree Expand file tree Collapse file tree 7 files changed +22
-38
lines changed
sdk/identity/identity-cache-persistence Expand file tree Collapse file tree 7 files changed +22
-38
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT license.
3
3
4
- import { IdentityPlugin } from "@azure/identity" ;
5
-
6
4
import { AzurePluginContext } from "../../identity/src/plugins/provider" ;
5
+ import { IdentityPlugin } from "@azure/identity" ;
7
6
import { createPersistenceCachePlugin } from "./provider" ;
8
7
9
8
/**
Original file line number Diff line number Diff line change 4
4
/* eslint-disable tsdoc/syntax */
5
5
6
6
import * as path from "path" ;
7
-
8
7
import {
9
- KeychainPersistence ,
10
- FilePersistence ,
11
8
DataProtectionScope ,
9
+ FilePersistence ,
12
10
FilePersistenceWithDataProtection ,
11
+ KeychainPersistence ,
13
12
LibSecretPersistence ,
14
13
IPersistence as Persistence ,
15
14
} from "@azure/msal-node-extensions" ;
16
-
17
15
import { TokenCachePersistenceOptions } from "@azure/identity" ;
18
16
19
17
/**
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT license.
3
3
4
- import { ICachePlugin as CachePlugin } from "@azure/msal-node" ;
5
- import { PersistenceCachePlugin , IPersistence as Persistence } from "@azure/msal-node-extensions" ;
6
-
7
4
import { MsalPersistenceOptions , msalPersistencePlatforms } from "./platforms" ;
5
+ import { IPersistence as Persistence , PersistenceCachePlugin } from "@azure/msal-node-extensions" ;
6
+ import { ICachePlugin as CachePlugin } from "@azure/msal-node" ;
8
7
9
8
/**
10
9
* This is used to gain access to the underlying Persistence instance, which we use for testing
Original file line number Diff line number Diff line change 3
3
4
4
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
5
5
6
- import Sinon from "sinon" ;
7
- import assert from "assert" ;
8
6
import * as path from "path" ;
9
-
10
- import { env , isPlaybackMode } from "@azure-tools/test-recorder" ;
11
- import { ConfidentialClientApplication } from "@azure/msal-node" ;
12
-
13
7
import {
14
8
ClientCertificateCredential ,
15
9
TokenCachePersistenceOptions ,
16
10
} from "../../../../identity/src" ;
17
11
import { MsalTestCleanup , msalNodeTestSetup } from "../../../../identity/test/msalTestUtils" ;
12
+ import { env , isPlaybackMode } from "@azure-tools/test-recorder" ;
13
+ import { ConfidentialClientApplication } from "@azure/msal-node" ;
18
14
import { MsalNode } from "../../../../identity/src/msal/nodeFlows/msalNodeCommon" ;
19
-
15
+ import Sinon from "sinon" ;
16
+ import assert from "assert" ;
20
17
import { createPersistence } from "./setup.spec" ;
21
18
22
19
const ASSET_PATH = "assets" ;
Original file line number Diff line number Diff line change 3
3
4
4
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
5
5
6
- import Sinon from "sinon" ;
7
- import assert from "assert" ;
8
-
9
- import { env } from "@azure-tools/test-recorder" ;
10
- import { ConfidentialClientApplication } from "@azure/msal-node" ;
11
-
12
6
import { ClientSecretCredential , TokenCachePersistenceOptions } from "../../../../identity/src" ;
13
7
import { MsalTestCleanup , msalNodeTestSetup } from "../../../../identity/test/msalTestUtils" ;
8
+ import { ConfidentialClientApplication } from "@azure/msal-node" ;
14
9
import { MsalNode } from "../../../../identity/src/msal/nodeFlows/msalNodeCommon" ;
15
-
10
+ import Sinon from "sinon" ;
11
+ import assert from "assert" ;
16
12
import { createPersistence } from "./setup.spec" ;
13
+ import { env } from "@azure-tools/test-recorder" ;
17
14
18
15
const scope = "https://graph.microsoft.com/.default" ;
19
16
Original file line number Diff line number Diff line change 3
3
4
4
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
5
5
6
- import Sinon from "sinon" ;
7
- import assert from "assert" ;
8
-
9
- import { PublicClientApplication } from "@azure/msal-node" ;
10
- import { isLiveMode } from "@azure-tools/test-recorder" ;
11
-
12
6
import { DeviceCodeCredential , TokenCachePersistenceOptions } from "../../../../identity/src" ;
13
7
import { MsalTestCleanup , msalNodeTestSetup } from "../../../../identity/test/msalTestUtils" ;
14
8
import { MsalNode } from "../../../../identity/src/msal/nodeFlows/msalNodeCommon" ;
15
-
9
+ import { PublicClientApplication } from "@azure/msal-node" ;
10
+ import Sinon from "sinon" ;
11
+ import assert from "assert" ;
16
12
import { createPersistence } from "./setup.spec" ;
13
+ import { isLiveMode } from "@azure-tools/test-recorder" ;
17
14
18
15
describe ( "DeviceCodeCredential (internal)" , function ( this : Mocha . Suite ) {
19
16
let cleanup : MsalTestCleanup ;
Original file line number Diff line number Diff line change 3
3
4
4
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
5
5
6
- import Sinon from "sinon" ;
7
- import assert from "assert" ;
8
-
9
- import { env } from "@azure-tools/test-recorder" ;
10
- import { PublicClientApplication } from "@azure/msal-node" ;
11
-
12
- import { UsernamePasswordCredential , TokenCachePersistenceOptions } from "../../../../identity/src" ;
13
6
import { MsalTestCleanup , msalNodeTestSetup } from "../../../../identity/test/msalTestUtils" ;
7
+ import { TokenCachePersistenceOptions , UsernamePasswordCredential } from "../../../../identity/src" ;
14
8
import { MsalNode } from "../../../../identity/src/msal/nodeFlows/msalNodeCommon" ;
15
-
9
+ import { PublicClientApplication } from "@azure/msal-node" ;
10
+ import Sinon from "sinon" ;
11
+ import assert from "assert" ;
16
12
import { createPersistence } from "./setup.spec" ;
13
+ import { env } from "@azure-tools/test-recorder" ;
17
14
18
15
describe ( "UsernamePasswordCredential (internal)" , function ( this : Mocha . Suite ) {
19
16
let cleanup : MsalTestCleanup ;
You can’t perform that action at this time.
0 commit comments