你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

UserTokenProvider 类

定义

为 Azure Active Directory Microsoft ID 和组织 ID 用户提供令牌。

public class UserTokenProvider : Microsoft.Rest.ITokenProvider
type UserTokenProvider = class
    interface ITokenProvider
Public Class UserTokenProvider
Implements ITokenProvider
继承
UserTokenProvider
实现

构造函数

UserTokenProvider(AuthenticationContext, String, Uri, UserIdentifier)

创建可在给定上下文中提供用户令牌的令牌提供程序。 用户必须事先在给定上下文中进行身份验证。 令牌从令牌缓存中检索。

字段

CommonTenantId

Active Directory 公共租户的 ID。

方法

CreateCredentialsFromCache(String, String, String)

使用使用默认令牌缓存从上一次登录缓存到 Azure 资源管理器的信息创建服务客户端凭据。 参数用于匹配现有令牌。

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings)

使用从默认令牌缓存中的以前登录名缓存的信息创建服务客户端凭据。 参数用于匹配现有令牌。

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

使用以前登录名中缓存的信息创建服务客户端凭据。 参数用于匹配现有令牌。

CreateCredentialsFromCache(String, String, String, TokenCache)

使用从以前登录 Azure 资源管理器中缓存的信息创建服务客户端凭据。 参数用于匹配现有令牌。

GetAuthenticationHeaderAsync(CancellationToken)

从令牌缓存或 AD 身份验证终结点获取访问令牌。 如果访问令牌已过期,将尝试刷新该令牌。

LoginByDeviceCodeAsync(String, Func<DeviceCodeResult,Boolean>)

使用设备代码身份验证登录到 Azure Active Directory。

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

使用设备代码身份验证登录到 Azure Active Directory。

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

使用设备代码身份验证登录到 Azure Active Directory。

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

使用设备代码身份验证登录到 Azure Active Directory。

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

使用设备代码身份验证登录到 Azure Active Directory。

适用于