KeyAction

flitter-auth/controllers/KeyAction~ KeyAction

Provides handler methods for flitter-auth's key actions. Key actions allow your application to dynamically generate one-time links that call methods on controllers and (optionally) can even automatically sign in a user for the request, then log them out. e.g. a password reset link could use a key action.


Constructor

new KeyAction()

Extends

Members

(static) services

Defines the services required by this unit.

(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.

Type:
  • boolean

(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.

(private) _di_deferred_services :Array.<string>

List of services that were deferred and not provided at the time of injection.

Type:
  • Array.<string>

Methods

(async) handle(req, res, next) → {Promise.<void>}

Handles a key action request by calling the configured controller handler method. Closes the key action afterward based on the configured settings.

Parameters:
Name Type Description
req express/request

the request

res express/response

the response

next function

the next function in the stack

Returns:
Type
Promise.<void>