import AuthenticationLowDbPlugin from 'devapt-core-server/js/security/authentication_plugin_lowdb.js'
AuthenticationLowDbPlugin
Extends:
Authentication class with a LowDb user/login database.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_manager: AuhtenticationManager, arg_name: string, arg_log_context: string | undefined): nothing Create an Authentication plugin class based on query parameters. |
Member Summary
Public Members | ||
public |
|
|
public |
file_db: * |
|
public |
file_name: * |
|
public |
id_fieldname: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
use_session: * |
|
public |
|
Method Summary
Public Methods | ||
public |
authenticate(arg_credentials: Credentials | undefined): object Authenticate a user with a file giving request credentials. |
|
public |
create_middleware(arg_should_401: boolean, arg_next_auth_mw: Function): Function Get a authentication middleware to use on servers (see Connect/Express middleware signature). |
|
public |
Disable authentication plugin with contextual informations. |
|
public |
Enable authentication plugin with contextual informations. |
|
public |
get_user_by_id(arg_user_id: string): string Get user record by its id. |
|
public |
get_user_id(arg_user_record: object): string Get user id from a user record. |
Inherited Summary
From class AuthenticationPlugin | ||
public |
|
|
public abstract |
apply_on_server(arg_server: object): nothing Apply authentication plugin io given server. |
|
public abstract |
authenticate(arg_credentials: Credentials | undefined): object Authenticate a user with request credentials. |
|
public abstract |
Check a credentials token. |
|
public abstract |
create_middleware(arg_should_401: boolean, arg_next_auth_mw: Function): Function Get a authentication middleware to use on servers (see Connect/Express middleware signature). |
|
public abstract |
Disable authentication plugin with contextual informations. |
|
public abstract |
Enable authentication plugin with contextual informations. |
|
public abstract |
Get credentials token of authenticated user. |
|
public abstract |
Login current request (alias of authenticate). |
|
public abstract |
Logout current authenticated user. |
|
public abstract |
Create a new credentials token for authenticated user. |
Public Constructors
public constructor(arg_manager: AuhtenticationManager, arg_name: string, arg_log_context: string | undefined): nothing source
Create an Authentication plugin class based on query parameters.
Override:
AuthenticationPlugin#constructorReturn:
nothing |
Public Members
public failure_redirect: * source
public file_db: * source
public file_name: * source
public id_fieldname: * source
public password_fieldname: * source
public success_redirect: * source
public use_session: * source
public username_fieldname: * source
Public Methods
public authenticate(arg_credentials: Credentials | undefined): object source
Authenticate a user with a file giving request credentials.
Override:
AuthenticationPlugin#authenticateParams:
Name | Type | Attribute | Description |
arg_credentials | Credentials | undefined | request credentials object. |
public create_middleware(arg_should_401: boolean, arg_next_auth_mw: Function): Function source
Get a authentication middleware to use on servers (see Connect/Express middleware signature).
public disable(arg_settings: object | undefined): object source
Disable authentication plugin with contextual informations.
Override:
AuthenticationPlugin#disablepublic enable(arg_settings: object | undefined): object source
Enable authentication plugin with contextual informations.