using System.Security.Claims;
using System.Text.Json;
namespace OpenIddict.Abstractions;
///
/// Represents an OpenIddict token descriptor.
///
public class OpenIddictTokenDescriptor
{
///
/// Gets or sets the identifier of the application associated with the token.
///
public string? ApplicationId { get; set; }
///
/// Gets or sets the identifier of the authorization associated with the token.
///
public string? AuthorizationId { get; set; }
///
/// Gets or sets the creation date of the token.
///
public DateTimeOffset? CreationDate { get; set; }
///
/// Gets or sets the expiration date of the token.
///
public DateTimeOffset? ExpirationDate { get; set; }
///
/// Gets or sets the payload of the token.
///
public string? Payload { get; set; }
///
/// Gets or sets the optional principal specified by the caller.
///
///
/// Note: this property is not stored by the default stores.
///
public ClaimsPrincipal? Principal { get; set; }
///
/// Gets the additional properties of the token.
///
public Dictionary Properties { get; } = new(StringComparer.Ordinal);
///
/// Gets or sets the redemption date of the token.
///
public DateTimeOffset? RedemptionDate { get; set; }
///
/// Gets or sets the reference identifier of the token.
///
///
/// Note: depending on the application manager used when creating it,
/// this property may be hashed or encrypted for security reasons.
///
public string? ReferenceId { get; set; }
///
/// Gets or sets the identifier of the session associated with the token.
///
public string? SessionId { get; set; }
///
/// Gets or sets the status of the token.
///
public string? Status { get; set; }
///
/// Gets or sets the subject of the token.
///
public string? Subject { get; set; }
///
/// Gets or sets the type of the token.
///
public string? Type { get; set; }
}