Extends
Members
(static) services
Defines the services required by this middleware.
- Source:
(private) _di_allow_defer :boolean
If true, the injector will defer the class if the class requests any services that the container is missing. These services are filled in later and added to the prototype and any instances. True by default.
- boolean
- Inherited From:
- Source:
(private) _di_deferred_instances :Array.<module:flitter-di/src/Injectable~Injectable>
Collection of instances of this class that need to have the deferred service instances injected into them when the deferred services are finally provided.
- Source:
(private) _di_deferred_services :Array.<string>
List of services that were deferred and not provided at the time of injection.
- Array.<string>
- Source:
Methods
(async) test(req, res, next, provider_nameopt) → {Promise.<*>}
Runs the middleware test. If the session is authenticated, injects the user's associated auth provider into 'request.auth_provider'.
Otherwise, if there is a string in 'request.params.provider', the corresponding auth provider will be injected. If all else fails, the default auth provider is used.
Name | Type | Attributes | Description |
---|---|---|---|
req |
express/request | the request |
|
res |
express/response | the response |
|
next |
function | the next function in the stack |
|
provider_name |
string |
<optional> |
optionally, the base provider name |
- Source:
- Type
- Promise.<*>