AuthenticateAsync() публичный Метод

Begins a server-side authentication flow by navigating the WebAuthenticationBroker to the startUrl.
/// Thrown if the user cancels the authentication flow or an error occurs during /// the authentication flow. ///
public AuthenticateAsync ( Uri startUrl, Uri endUrl, bool useSingleSignOn ) : Task
startUrl System.Uri The URL that the browser-based control should /// first navigate to in order to start the authenication flow. ///
endUrl System.Uri The URL that indicates the authentication flow has /// completed. Upon being redirected to any URL that starts with the /// endUrl, the browser-based control must stop navigating and /// return the response data to the . ///
useSingleSignOn bool Indicates if single sign-on should be used so /// that users do not have to re-enter his/her credentials every time. ///
Результат Task
        /// <summary>
        /// Provides Login logic by showing a login UI.
        /// </summary>
        /// <returns>
        /// Task that will complete with the response string when the user has finished authentication.
        /// </returns>
        protected override Task<string> LoginAsyncOverride()
        {
            AuthenticationBroker broker = new AuthenticationBroker();

            return broker.AuthenticateAsync(this.StartUri, this.EndUri, false);
        }
        /// <summary>
        /// Provides Login logic by showing a UI and using single sign-on.
        /// </summary>
        /// <returns>
        /// Task that will complete with the response string when the user has finished authentication.
        /// </returns>
        protected override Task <string> LoginAsyncOverride()
        {
            AuthenticationBroker broker = new AuthenticationBroker();

            return(broker.AuthenticateAsync(this.StartUri, this.EndUri, true));
        }