using Kyoo.Abstractions.Models.Permissions;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Kyoo.Abstractions.Controllers
{
///
/// A service to validate permissions.
///
public interface IPermissionValidator
{
///
/// Create an IAuthorizationFilter that will be used to validate permissions.
/// This can registered with any lifetime.
///
/// The permission attribute to validate.
/// An authorization filter used to validate the permission.
IFilterMetadata Create(PermissionAttribute attribute);
///
/// Create an IAuthorizationFilter that will be used to validate permissions.
/// This can registered with any lifetime.
///
///
/// A partial attribute to validate. See .
///
/// An authorization filter used to validate the permission.
IFilterMetadata Create(PartialPermissionAttribute attribute);
}
}