Add middleware and logic for bootstrapping the session auth
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
11
src/auth/NotAuthorizedError.ts
Normal file
11
src/auth/NotAuthorizedError.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import {HTTPError} from '../http/HTTPError'
|
||||
import {HTTPStatus} from '../util'
|
||||
|
||||
/**
|
||||
* Error thrown when a user attempts an action that they are not authorized to perform.
|
||||
*/
|
||||
export class NotAuthorizedError extends HTTPError {
|
||||
constructor(message = 'Not Authorized') {
|
||||
super(HTTPStatus.FORBIDDEN, message)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user