📝Middleware - Authorization
The middleware for check authorization.
Imports
Environment Variables
name
description
MASTER_KEY
The master key used to authenticate the routes.
Write .env
file with environment variable. Below has an example:
.env
Method of Use
To use this middleware, you need to inject it into the desired module.
With dependencies
You will need to inject the following interfaces.
Interface
Service
IConfigurationService
IValidatorRegexpService
IStringExService
Ii18nService
IRedisService
IDebugService
IPropStringService
IAppHostService
Methods
Method
Scope
Description
_invalidMasterKey
private
Check if the master key is invalid.
_invalidPrivateKey
private
Check if the private key is invalid.
use
public
The method for check authorization.
Last updated