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.
|
|
|
|
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();
|
|
|
|
|
}
|