Extends
Members
(static) name
Get the name of the service this unit represents - 'auth'
- Source:
(static) services
Defines the services required by this unit.
- 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
- Overrides:
- 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:
provider_classes :object
Mapping of provider class names to static provider classes.
- object
- Source:
providers :object
Mapping of provider names to instances of the {module:flitter-auth/Provider~Provider} classes.
- object
- Source:
Methods
(async) cleanup(app) → {Promise.<void>}
Clean up the resources managed by this unit. Calls the 'cleanup' method on all registered providers in this service.
Name | Type | Description |
---|---|---|
app |
module:libflitter/app/FlitterApp~FlitterApp | the Flitter app |
- Overrides:
- Source:
- Type
- Promise.<void>
(async) deploy() → {Promise.<void>}
Deploy the resources provided by flitter-auth. That is, the controllers/views/routes/models/middleware/etc.
- Source:
- Type
- Promise.<void>
directories() → {Object}
Get the directories provided by the unit. Should be an object such that key => value is the name of the directory => fully qualified path to the directory.
- Overrides:
- Source:
- Type
- Object
get_provider(nameopt) → {module:flitter-auth/Provider~Provider}
Get the provider configured with the specified name. If no name is provided, the default provider will be returned.
Name | Type | Attributes | Description |
---|---|---|---|
name |
string |
<optional> |
- Source:
get_provider_instance(name) → {module:flitter-auth/Provider~Provider}
Get the auth source instance with the specified name.
Name | Type | Description |
---|---|---|
name |
string |
- Source:
(async) go(app) → {Promise.<void>}
Initialize the unit:
- Registers the auth and authProvider canonical resources
- For all configured auth sources, create a new instance of the applicable provider and register it with this service.
Name | Type | Description |
---|---|---|
app |
module:libflitter/app/FlitterApp~FlitterApp | the Flitter app |
- Overrides:
- Source:
- Type
- Promise.<void>
(async) init_oauth() → {Promise.<void>}
Initializes the OAuth2 server's resources.
- Source:
- Type
- Promise.<void>
migrations() → {string}
Get the fully-qualified path to the migrations provided by this unit.
- Source:
- Type
- string
name() → {String}
Get the name of the unit. Should be a lowercase, alphanum/dash/underscore string.
- Overrides:
- Source:
- Type
- String
resolve_provider(name) → {module:flitter-auth/Provider~Provider}
Get the auth provider class definition with the specified name.
Name | Type | Description |
---|---|---|
name |
string |
- Source:
- the static CLASS reference
status(setopt) → {string}
Get or set the unit's current status.
Name | Type | Attributes | Description |
---|---|---|---|
set |
string |
<optional> |
if provided, set the status of the unit |
- Overrides:
- Source:
- current status of the unit
- Type
- string