namespace ZB.MOM.WW.MxGateway.Server.Security.Authentication;

public sealed record ApiKeyIdentity(
    string KeyId,
    string KeyPrefix,
    string DisplayName,
    IReadOnlySet<string> Scopes,
    ApiKeyConstraints? Constraints = null)
{
    /// <summary>Gets the effective API key constraints (defaults to Empty if null).</summary>
    public ApiKeyConstraints EffectiveConstraints => Constraints ?? ApiKeyConstraints.Empty;
}
