feat: Add acl support

This commit is contained in:
Joachim Van Herwegen
2020-08-07 11:54:27 +02:00
parent 011822e859
commit 0545ca121e
14 changed files with 524 additions and 13 deletions

View File

@@ -0,0 +1,10 @@
import { HttpError } from './HttpError';
/**
* An error thrown when an agent is not allowed to access data.
*/
export class ForbiddenHttpError extends HttpError {
public constructor(message?: string) {
super(403, 'ForbiddenHttpError', message);
}
}

View File

@@ -0,0 +1,10 @@
import { HttpError } from './HttpError';
/**
* An error thrown when an agent is not authorized.
*/
export class UnauthorizedHttpError extends HttpError {
public constructor(message?: string) {
super(401, 'UnauthorizedHttpError', message);
}
}