You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.6 KiB
74 lines
2.6 KiB
/*
|
|
* 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 System.Security.Cryptography.X509Certificates;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace OpenIddict.Server;
|
|
|
|
/// <summary>
|
|
/// Represents the context associated with an OpenID Connect server request.
|
|
/// </summary>
|
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
|
public sealed class OpenIddictServerTransaction
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the cancellation token that will be
|
|
/// used to determine if the operation was aborted.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// 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.
|
|
/// </remarks>
|
|
public CancellationToken CancellationToken { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the X.509 client certificate used by the remote peer, if available.
|
|
/// </summary>
|
|
public X509Certificate2? RemoteCertificate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the type of the endpoint processing the current request.
|
|
/// </summary>
|
|
public OpenIddictServerEndpointType EndpointType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the request <see cref="Uri"/> of the current transaction, if available.
|
|
/// </summary>
|
|
public Uri? RequestUri { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the base <see cref="Uri"/> of the host, if available.
|
|
/// </summary>
|
|
public Uri? BaseUri { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the logger associated with the current request.
|
|
/// </summary>
|
|
public ILogger Logger { get; set; } = default!;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the options associated with the current request.
|
|
/// </summary>
|
|
public OpenIddictServerOptions Options { get; set; } = default!;
|
|
|
|
/// <summary>
|
|
/// Gets the additional properties associated with the current request.
|
|
/// </summary>
|
|
public Dictionary<string, object?> Properties { get; } = new(StringComparer.OrdinalIgnoreCase);
|
|
|
|
/// <summary>
|
|
/// Gets or sets the current OpenID Connect request.
|
|
/// </summary>
|
|
public OpenIddictRequest? Request { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the current OpenID Connect response being returned.
|
|
/// </summary>
|
|
public OpenIddictResponse? Response { get; set; }
|
|
}
|
|
|