次の方法で共有


ICustomWebUi.AcquireAuthorizationCodeAsync Method

Definition

Method called by MSAL.NET to delegate the authentication code web with the Secure Token Service (STS)

public System.Threading.Tasks.Task<Uri> AcquireAuthorizationCodeAsync (Uri authorizationUri, Uri redirectUri, System.Threading.CancellationToken cancellationToken);
abstract member AcquireAuthorizationCodeAsync : Uri * Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
Public Function AcquireAuthorizationCodeAsync (authorizationUri As Uri, redirectUri As Uri, cancellationToken As CancellationToken) As Task(Of Uri)

Parameters

authorizationUri
Uri

URI computed by MSAL.NET that will let the UI extension navigate to the STS authorization endpoint in order to sign-in the user and have them consent

redirectUri
Uri

The redirect URI that was configured. The auth code will be appended to this redirect URI and the browser will redirect to it.

cancellationToken
CancellationToken

The cancellation token to which you should respond to. See Task cancellation for details.

Returns

The URI returned back from the STS authorization endpoint. This URI contains a code=CODE parameters that MSAL.NET will extract and redeem.

Remarks

The authorizationUri is crafted to leverage PKCE in order to protect the token from a man in the middle attack. Only MSAL.NET can redeem the code.

Applies to