34 lines
954 B
C#
34 lines
954 B
C#
using MxGateway.Server.Security.Authentication;
|
|
using MxGateway.Server.Sessions;
|
|
|
|
namespace MxGateway.Server.Security.Authorization;
|
|
|
|
public interface IConstraintEnforcer
|
|
{
|
|
Task<ConstraintFailure?> CheckReadTagAsync(
|
|
ApiKeyIdentity? identity,
|
|
string tagAddress,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<ConstraintFailure?> CheckReadHandleAsync(
|
|
ApiKeyIdentity? identity,
|
|
GatewaySession session,
|
|
int serverHandle,
|
|
int itemHandle,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<ConstraintFailure?> CheckWriteHandleAsync(
|
|
ApiKeyIdentity? identity,
|
|
GatewaySession session,
|
|
int serverHandle,
|
|
int itemHandle,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task RecordDenialAsync(
|
|
ApiKeyIdentity? identity,
|
|
string commandKind,
|
|
string target,
|
|
ConstraintFailure failure,
|
|
CancellationToken cancellationToken);
|
|
}
|