using Connected.ServiceModel; namespace Connected.Security.Authorization; public enum AuthorizationContextState { Pending = 0, Authorizing = 1, Granted = 2, Revoked = 3 } public interface IAuthorizationContext { AuthorizationContextState State { get; } Task Authorize(AuthorizationArgs args); Task Authorize(ICallerContext context, TArgs args) where TArgs : IDto; Task Authorize(ICallerContext context, TArgs args, TComponent component) where TArgs : IDto; void Revoke(); }