namespace EonaCat.DoxaApi.Attributes { // This file is part of the EonaCat project(s) which is released under the Apache License. // See the LICENSE file or go to https://EonaCat.com/license for full license details. /// /// Declares that an endpoint (or every endpoint in a controller) requires one of the /// named security schemes registered via DoxaApiOptions.AddSecurityScheme(...). /// Multiple attributes may be stacked; any one of the referenced schemes satisfies the /// endpoint (logical OR), matching OpenAPI's security requirement semantics. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class DoxaApiAuthAttribute : Attribute { public string SchemeId { get; } public DoxaApiAuthAttribute(string schemeId) => SchemeId = schemeId; } /// /// Marks an endpoint (or controller) as explicitly not requiring authentication, /// overriding any document-wide default security scheme. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] public sealed class DoxaApiAllowAnonymousAttribute : Attribute { } }