2026-02-20 17:35:38 +01:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2026-02-15 19:06:09 +01:00
|
|
|
using IdentityShroud.Core.Security;
|
2026-02-20 17:35:38 +01:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2026-02-15 19:06:09 +01:00
|
|
|
|
2026-02-06 19:58:01 +01:00
|
|
|
namespace IdentityShroud.Core.Model;
|
|
|
|
|
|
2026-02-20 17:35:38 +01:00
|
|
|
[Table("client")]
|
|
|
|
|
[Index(nameof(ClientId), IsUnique = true)]
|
2026-02-06 19:58:01 +01:00
|
|
|
public class Client
|
|
|
|
|
{
|
2026-02-20 17:35:38 +01:00
|
|
|
[Key]
|
2026-02-21 20:15:46 +01:00
|
|
|
public int Id { get; set; }
|
2026-02-20 17:35:38 +01:00
|
|
|
public Guid RealmId { get; set; }
|
|
|
|
|
[MaxLength(40)]
|
|
|
|
|
public required string ClientId { get; set; }
|
|
|
|
|
[MaxLength(80)]
|
|
|
|
|
public string? Name { get; set; }
|
|
|
|
|
[MaxLength(2048)]
|
|
|
|
|
public string? Description { get; set; }
|
2026-02-15 19:06:09 +01:00
|
|
|
|
2026-02-20 17:35:38 +01:00
|
|
|
[MaxLength(20)]
|
|
|
|
|
public string? SignatureAlgorithm { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool AllowClientCredentialsFlow { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
public required DateTime CreatedAt { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<ClientSecret> Secrets { get; set; } = [];
|
2026-02-06 19:58:01 +01:00
|
|
|
}
|