namespace Svrnty.CQRS.Altcha.Abstractions; /// /// Marks a command or query as requiring proof-of-work (or equivalent /// anti-abuse evidence) before the framework will dispatch it to the handler. /// /// /// The accompanying request type should implement /// to carry the widget's solution payload. The framework's Altcha /// authorization check (registered via AddSvrntyAltcha()) reads the /// solution off the request and calls the configured . /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class AltchaAttribute : Attribute { /// /// When true (default), a valid mobile-attestation token on the /// request satisfies the requirement without needing a proof-of-work /// solution. The Altcha check reads /// ["mobile_attested"] /// — when stamped true by an earlier check (e.g. an Apple /// App Attest / Play Integrity verifier), the PoW check is skipped. /// Set to false on commands where PoW must always run regardless /// of caller. /// public bool AllowMobileAttestationBypass { get; set; } = true; }