Constructor
new Authentication()
- Source:
Members
plugins :Object
- Description:
- Registered authentication plugins
- Source:
Registered authentication plugins
Type:
Methods
(async) checkHandler(req, res, next)
- Description:
- Verifies the incoming request is correctly authenticated
- Source:
Parameters:
Name |
Type |
Description |
req |
external:ExpressRequest
|
|
res |
external:ExpressResponse
|
|
next |
function
|
|
(async) disavowHandler(req, res, next)
- Description:
- Verifies the incoming request is correctly authenticated
- Source:
Parameters:
Name |
Type |
Description |
req |
external:ExpressRequest
|
|
res |
external:ExpressResponse
|
|
next |
function
|
|
(async) disavowUser(query) → {Promise}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
query |
object
|
Token search query |
Returns:
-
Type
-
Promise
(async) generateTokenHandler(req, res, next)
- Description:
- Handles token generation requests
- Source:
Parameters:
Name |
Type |
Description |
req |
external:ExpressRequest
|
|
res |
external:ExpressResponse
|
|
next |
function
|
|
(async) init(auth) → {Promise}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
auth |
AuthModule
|
The app auth module instance |
Returns:
-
Type
-
Promise
registerPlugin(type, instance)
- Description:
- Registers a module to be used for authentication
- Source:
Parameters:
Name |
Type |
Description |
type |
String
|
Identifier for the module |
instance |
AbstractAuthModule
|
The auth module to register |
(async) registerUser(authType, userData) → {Promise}
- Description:
- Shortcut to authentication helper function
- Source:
Parameters:
Name |
Type |
Description |
authType |
String
|
Authentication type |
userData |
Object
|
Data to be inserted if user doesn't exist |
Returns:
-
Type
-
Promise
(async) retrieveTokensHandler(req, res, next)
- Description:
- Handles token retrieval requests
- Source:
Parameters:
Name |
Type |
Description |
req |
external:ExpressRequest
|
|
res |
external:ExpressResponse
|
|
next |
function
|
|
(async, static) init() → {Promise}
- Description:
- Creates and instanciates the class
- Source:
Returns:
Resolves with the instance
-
Type
-
Promise