IAccessTokenProvider.RequestAccessToken 方法

定义

重载

RequestAccessToken()

尝试获取具有默认权限集的当前用户的访问令牌。

RequestAccessToken(AccessTokenRequestOptions)

尝试使用 中指定的 AccessTokenRequestOptions选项获取访问令牌。

RequestAccessToken()

Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs

尝试获取具有默认权限集的当前用户的访问令牌。

public:
 System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Components::WebAssembly::Authentication::AccessTokenResult ^> RequestAccessToken();
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult> RequestAccessToken ();
abstract member RequestAccessToken : unit -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult>
Public Function RequestAccessToken () As ValueTask(Of AccessTokenResult)

返回

完成后 ValueTask<TResult> 将包含 的 AccessTokenResult

适用于

RequestAccessToken(AccessTokenRequestOptions)

Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs
Source:
IAccessTokenProvider.cs

尝试使用 中指定的 AccessTokenRequestOptions选项获取访问令牌。

public:
 System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Components::WebAssembly::Authentication::AccessTokenResult ^> RequestAccessToken(Microsoft::AspNetCore::Components::WebAssembly::Authentication::AccessTokenRequestOptions ^ options);
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult> RequestAccessToken (Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenRequestOptions options);
abstract member RequestAccessToken : Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenRequestOptions -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult>
Public Function RequestAccessToken (options As AccessTokenRequestOptions) As ValueTask(Of AccessTokenResult)

参数

options
AccessTokenRequestOptions

AccessTokenRequestOptions用于预配访问令牌的 。

返回

完成后 ValueTask<TResult> 将包含 的 AccessTokenResult

适用于