mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 08:23:12 +00:00
27 lines
1,020 B
C#
27 lines
1,020 B
C#
namespace SeaHaven.Services.Helpers
|
|
{
|
|
/// <summary>Server-derived claim type names emitted at token issuance.</summary>
|
|
public static class SeaHavenClaimTypes
|
|
{
|
|
/// <summary>CRM account id from <c>ApplicationUser.AccountId</c> (never from request body).</summary>
|
|
public const string AccountId = "account_id";
|
|
|
|
/// <summary>Explicit org-wide media scope; value <see cref="OrgScopeAll"/>.</summary>
|
|
public const string OrgScope = "org_scope";
|
|
|
|
/// <summary>Signed org-wide elevation (Admin without AccountId).</summary>
|
|
public const string OrgScopeAll = "all";
|
|
}
|
|
|
|
/// <summary>Resolved media tenant scope from signed claims (fail-closed when Missing).</summary>
|
|
public abstract record MediaAccountScope
|
|
{
|
|
private MediaAccountScope() { }
|
|
|
|
public sealed record Account(int AccountId) : MediaAccountScope;
|
|
|
|
public sealed record OrgWide : MediaAccountScope;
|
|
|
|
public sealed record Missing : MediaAccountScope;
|
|
}
|
|
}
|