SudoSOS Back-end API / internal/controller / PolicyImplementation
Interface: PolicyImplementation() ​
The PolicyImplementation interface represents a function that determines if the given request is allowed to execute the handler. If this is not allowed, the function must return false. This policy is wrappable in a PolicyMiddleware.
ts
PolicyImplementation(req): Promise<boolean>;The PolicyImplementation interface represents a function that determines if the given request is allowed to execute the handler. If this is not allowed, the function must return false. This policy is wrappable in a PolicyMiddleware.
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
Returns ​
Promise<boolean>