Class SharedTokenCacheCredential
Authenticates using tokens in the local cache shared between Microsoft applications.
Inheritance
SharedTokenCacheCredential
Assembly: Azure.Identity.dll
Syntax
public class SharedTokenCacheCredential : Azure.Core.TokenCredential
Constructors
Creates a new SharedTokenCacheCredential which will authenticate users with the specified application.
Declaration
public SharedTokenCacheCredential ();
Creates a new SharedTokenCacheCredential with the specified options, which will authenticate users with the specified application.
Declaration
public SharedTokenCacheCredential (string username, Azure.Identity.TokenCredentialOptions options = null);
Parameters
String
username
The username of the user to authenticate
|
TokenCredentialOptions
options
The client options for the newly created SharedTokenCacheCredential
|
Methods
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. This method is called by Azure SDK clients. It isn't intended for use in application code.
Declaration
public override Azure.Core.AccessToken GetToken (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.Core.TokenRequestContext
requestContext
The details of the authentication request.
|
CancellationToken
cancellationToken
A CancellationToken controlling the request lifetime
|
Returns
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. This method is called by Azure SDK clients. It isn't intended for use in application code.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.Core.TokenRequestContext
requestContext
The details of the authentication request.
|
CancellationToken
cancellationToken
A CancellationToken controlling the request lifetime
|
Returns