/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/openiddict/openiddict-core for more information concerning
* the license and the contributors participating to this project.
*/
using System.ComponentModel;
using Microsoft.Extensions.Logging;
namespace OpenIddict.Client;
///
/// Represents the context associated with an OpenID Connect client request.
///
[EditorBrowsable(EditorBrowsableState.Advanced)]
public sealed class OpenIddictClientTransaction
{
///
/// Gets or sets the cancellation token that will be
/// used to determine if the operation was aborted.
///
///
/// Note: for security reasons, this property shouldn't be used by event
/// handlers to abort security-sensitive operations. As such, it is
/// recommended to use this property only for user-dependent operations.
///
public CancellationToken CancellationToken { get; set; }
///
/// Gets or sets the type of the endpoint processing the current request.
///
public OpenIddictClientEndpointType EndpointType { get; set; }
///
/// Gets or sets the request of the current transaction, if available.
///
public Uri? RequestUri { get; set; }
///
/// Gets or sets the base of the host, if available.
///
public Uri? BaseUri { get; set; }
///
/// Gets or sets the logger associated with the current request.
///
public ILogger Logger { get; set; } = default!;
///
/// Gets or sets the options associated with the current request.
///
public OpenIddictClientOptions Options { get; set; } = default!;
///
/// Gets the additional properties associated with the current request.
///
public Dictionary Properties { get; } = new(StringComparer.OrdinalIgnoreCase);
///
/// Gets or sets the client registration used for the current request.
///
public OpenIddictClientRegistration Registration { get; set; } = default!;
///
/// Gets or sets the server configuration used for the current request.
///
public OpenIddictConfiguration Configuration { get; set; } = default!;
///
/// Gets or sets the current OpenID Connect request.
///
public OpenIddictRequest? Request { get; set; }
///
/// Gets or sets the current OpenID Connect response being returned.
///
public OpenIddictResponse? Response { get; set; }
}