HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Method AuthenticateAsync

    AuthenticateAsync(WebAuthenticationOptions, Uri, Uri, CancellationToken)

    Opens requestUri in the default browser and waits for the browser to return to callbackUri.

    Declaration
    public Task<WebAuthenticationResult> AuthenticateAsync(WebAuthenticationOptions options, Uri requestUri, Uri callbackUri, CancellationToken ct)
    Parameters
    Type Name Description
    WebAuthenticationOptions options

    The options. Not used.

    Uri requestUri

    The address to open.

    Uri callbackUri

    The loopback HTTP address to wait on, normally the one returned by GetCurrentApplicationCallbackUri().

    CancellationToken ct

    A token that cancels the wait, which then reports Windows.Security.Authentication.Web.WebAuthenticationStatus.UserCancel.

    Returns
    Type Description
    Task<WebAuthenticationResult>

    The result. On success, its response data is the full callback address the browser returned to, including the query. If the browser could not be opened or didn't open the request within StartTimeout, the status is Windows.Security.Authentication.Web.WebAuthenticationStatus.ErrorHttp and the response data describes the error.

    Implements
    IWebAuthenticationBrokerProvider.AuthenticateAsync(WebAuthenticationOptions, Uri, Uri, CancellationToken)
    Exceptions
    Type Condition
    ArgumentException

    callbackUri is not a loopback HTTP address, or its path is /start.

    © Singulink. All rights reserved.