共用方式為


OAuthHandler<TOptions>.ExchangeCodeAsync 方法

定義

多載

ExchangeCodeAsync(OAuthCodeExchangeContext)

從遠端提供者交換授權權杖的授權碼。

ExchangeCodeAsync(String, String)

ExchangeCodeAsync(OAuthCodeExchangeContext)

來源:
OAuthHandler.cs

從遠端提供者交換授權權杖的授權碼。

protected:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Authentication::OAuth::OAuthTokenResponse ^> ^ ExchangeCodeAsync(Microsoft::AspNetCore::Authentication::OAuth::OAuthCodeExchangeContext ^ context);
protected virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse> ExchangeCodeAsync (Microsoft.AspNetCore.Authentication.OAuth.OAuthCodeExchangeContext context);
abstract member ExchangeCodeAsync : Microsoft.AspNetCore.Authentication.OAuth.OAuthCodeExchangeContext -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse>
override this.ExchangeCodeAsync : Microsoft.AspNetCore.Authentication.OAuth.OAuthCodeExchangeContext -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse>
Protected Overridable Function ExchangeCodeAsync (context As OAuthCodeExchangeContext) As Task(Of OAuthTokenResponse)

參數

傳回

回應 OAuthTokenResponse

適用於

ExchangeCodeAsync(String, String)

來源:
OAuthHandler.cs
來源:
OAuthHandler.cs
protected:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Authentication::OAuth::OAuthTokenResponse ^> ^ ExchangeCodeAsync(System::String ^ code, System::String ^ redirectUri);
protected virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse> ExchangeCodeAsync (string code, string redirectUri);
abstract member ExchangeCodeAsync : string * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse>
override this.ExchangeCodeAsync : string * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse>
Protected Overridable Function ExchangeCodeAsync (code As String, redirectUri As String) As Task(Of OAuthTokenResponse)

參數

code
String
redirectUri
String

傳回

適用於