Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of <see cref="AccessTokenResult"/>.
 /// </summary>
 /// <param name="status">The status of the result.</param>
 /// <param name="token">The <see cref="AccessToken"/> in case it was successful.</param>
 /// <param name="interactiveRequestUrl">The redirect uri to go to for provisioning the token with <see cref="NavigationManagerExtensions.NavigateToLogin(NavigationManager, string, InteractiveRequestOptions)"/>.</param>
 /// <param name="interactiveRequest">The <see cref="InteractiveRequestOptions"/> containing the parameters for the interactive authentication.</param>
 public AccessTokenResult(AccessTokenResultStatus status, AccessToken token, string interactiveRequestUrl, InteractiveRequestOptions interactiveRequest)
 {
     Status = status;
     _token = token;
     InteractiveRequestUrl = interactiveRequestUrl;
     InteractionOptions    = interactiveRequest;
 }
 /// <summary>
 /// Initiates a logout operation by navigating to the log out endpoint.
 /// </summary>
 /// <remarks>
 /// The navigation includes stated that is added to the browser history entry to
 /// prevent logout operations performed from different contexts.
 /// </remarks>
 /// <param name="manager">The <see cref="NavigationManager"/>.</param>
 /// <param name="loginPath">The path to the login url.</param>
 /// <param name="request">The <see cref="InteractiveRequestOptions"/> containing the authorization details.</param>
 public static void NavigateToLogin(this NavigationManager manager, string loginPath, InteractiveRequestOptions request)
 {
     manager.NavigateTo(loginPath, new NavigationOptions
     {
         HistoryEntryState = request.ToState(),
     });
 }