Condividi tramite


UserTokenProvider Class

Definition

Provides tokens for Azure Active Directory Microsoft Id and Organization Id users.

public class UserTokenProvider : Microsoft.Rest.ITokenProvider
type UserTokenProvider = class
    interface ITokenProvider
Public Class UserTokenProvider
Implements ITokenProvider
Inheritance
UserTokenProvider
Implements

Constructors

UserTokenProvider(AuthenticationContext, String, Uri, UserIdentifier)

Create a token provider which can provide user tokens in the given context. The user must have previously authenticated in the given context. Tokens are retrieved from the token cache.

Fields

CommonTenantId

The id of the active directory common tenant.

Methods

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings, TokenCache)

Create service client credentials using information cached from a previous login. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings)

Create service client credentials using information cached from a previous login in the default token cache. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String, TokenCache)

Create service client credentials using information cached from a previous login to azure resource manager. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String)

Create service client credentials using information cached from a previous login to azure resource manager using the default token cache. Parameters are used to match existing tokens.

GetAuthenticationHeaderAsync(CancellationToken)

Gets an access token from the token cache or from AD authentication endpoint. Will attempt to refresh the access token if it has expired.

LoginByDeviceCodeAsync(String, Func<DeviceCodeResult,Boolean>)

Log in to azure active directory using device code authentication.

LoginByDeviceCodeAsync(String, String, ActiveDirectoryServiceSettings, Func<DeviceCodeResult,Boolean>)

Log in to azure active directory using device code authentication.

LoginByDeviceCodeAsync(String, String, ActiveDirectoryServiceSettings, TokenCache, Func<DeviceCodeResult,Boolean>)

Log in to azure active directory using device code authentication.

LoginByDeviceCodeAsync(String, String, Func<DeviceCodeResult,Boolean>)

Log in to azure active directory using device code authentication.

LoginByDeviceCodeAsync(String, String, TokenCache, Func<DeviceCodeResult,Boolean>)

Log in to azure active directory using device code authentication.

Applies to