using Microsoft.AspNetCore.Mvc.Filters;

namespace ErsatzTV.Filters;

/// <summary>
///     Marks an internal API endpoint as exempt from the global <see cref="ApiAuthorizationFilter" />
///     (neither a machine key nor a session is required). Used for endpoints that are guarded by a
///     different mechanism (e.g. the scanner callback's localhost-only check) and for the
///     <c>/api/v1/auth/*</c> surface itself, which must be reachable before a caller is authenticated.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public sealed class SkipApiAuthorizationAttribute : Attribute, IFilterMetadata;
