SharedTokenCacheCredential Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Authenticates using tokens in a local cache file. This is a legacy mechanism for authenticating clients using credentials provided to Visual Studio. This mechanism for Visual Studio authentication has been replaced by the VisualStudioCredential.
public class SharedTokenCacheCredential : Azure.Core.TokenCredential
type SharedTokenCacheCredential = class
inherit TokenCredential
Public Class SharedTokenCacheCredential
Inherits TokenCredential
- Inheritance
Constructors
SharedTokenCacheCredential() |
Creates a new SharedTokenCacheCredential which will authenticate users signed in through developer tools supporting Azure single sign on. |
SharedTokenCacheCredential(SharedTokenCacheCredentialOptions) |
Creates a new SharedTokenCacheCredential which will authenticate users signed in through developer tools supporting Azure single sign on. |
Methods
GetToken(TokenRequestContext, CancellationToken) |
Obtains an AccessToken token for a user account silently if the user has already authenticated to another Microsoft application participating in SSO through a shared MSAL cache. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. |
GetTokenAsync(TokenRequestContext, CancellationToken) |
Obtains an AccessToken token for a user account silently if the user has already authenticated to another Microsoft application participating in SSO through a shared MSAL cache. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. |
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應