Skip to content

SudoSOS Back-end API / internal/controller / MethodPolicy

Interface: MethodPolicy ​

The MethodPolicy interface represents a single HTTP method of a route

Properties ​

body? ​

ts
optional body: BodyValidator;

The body validator for this method.


handler ​

ts
handler: RequestHandler;

The request handler to be executed if the policy passes.


policy ​

ts
policy: PolicyImplementation;

The policy which represents authorization for this method.


restrictions? ​

ts
optional restrictions: Partial<TokenRestrictions>;

Extra restrictions for this endpoint put upon the token.