-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Identity] UsernamePasswordCredential API alignment #14836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,22 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| import { InteractiveCredentialOptions } from "./interactiveCredentialOptions"; | ||
| import { TokenCredentialOptions } from "../client/identityClient"; | ||
| import { TokenCachePersistenceOptions } from "../tokenCache/persistencePlatforms"; | ||
|
|
||
| /** | ||
| * Defines options for the {@link UsernamePasswordCredential} class. | ||
| */ | ||
| export interface UsernamePasswordCredentialOptions extends InteractiveCredentialOptions {} | ||
| export interface UsernamePasswordCredentialOptions extends TokenCredentialOptions { | ||
| /** | ||
| * To provide a persistence layer to store the credentials, | ||
| * we allow users to optionally specify {@link TokenCachePersistenceOptions} for their credential. | ||
| * | ||
| * This feature is not currently available on Node 8 or earlier versions of Node JS. | ||
| * | ||
| * This persistence layer uses DPAPI on Windows. | ||
| * On OSX (Darwin) it tries to use the system's Keychain, otherwise if the property `allowUnencryptedStorage` is set to true, it uses an unencrypted file. | ||
| * On Linux it tries to use the system's Keyring, otherwise if the property `allowUnencryptedStorage` is set to true, it uses an unencrypted file. | ||
|
Comment on lines
+18
to
+19
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the file definitely unencrypted or just not protected by the native OS secret store?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file is unencrypted, only protected by file-system protections. Here's one example in the source: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/src/tokenCache/persistencePlatforms.ts#L152-L155 MSAL for node offers a |
||
| */ | ||
| tokenCachePersistenceOptions?: TokenCachePersistenceOptions; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets have this in a separate section
Breaking changes from 2.0.0-beta.1There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!