-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathAllowDuringSetupAttribute.cs
More file actions
20 lines (19 loc) · 856 Bytes
/
AllowDuringSetupAttribute.cs
File metadata and controls
20 lines (19 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
namespace Nocturne.API.Authorization;
/// <summary>
/// Marks a controller or action as safe to invoke while the current tenant has not
/// yet completed first-time setup (no passkey credentials).
/// <para>
/// <see cref="Middleware.TenantSetupMiddleware"/> uses endpoint metadata to
/// short-circuit blocking behavior when this attribute is present.
/// </para>
/// <para>
/// Apply sparingly -- only to endpoints that must be reachable to bootstrap a tenant
/// (passkey/TOTP setup, OIDC bootstrap login, admin tenant provisioning, metadata).
/// </para>
/// </summary>
/// <seealso cref="Middleware.TenantSetupMiddleware"/>
/// <seealso cref="Middleware.RecoveryModeMiddleware"/>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class AllowDuringSetupAttribute : Attribute
{
}