You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Security/Authorization/IAuthorizationContext.cs

27 lines
557 B

2 years ago
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<IAuthorizationResult> Authorize(AuthorizationArgs args);
Task Authorize<TArgs>(ICallerContext context, TArgs args)
where TArgs : IDto;
Task<TComponent> Authorize<TArgs, TComponent>(ICallerContext context, TArgs args, TComponent component)
where TArgs : IDto;
void Revoke();
}