import AuthenticationPlugin from 'devapt-core-server/js/security/authentication_plugin.js'
AuthenticationPlugin
Extends:
Direct Subclass:
Authentication plugin base class.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_runtime: RuntimeBase, arg_manager: AuhtenticationManager, arg_name: string, arg_class: string, arg_log_context: string | undefined): nothing Create an Authentication base class. |
Member Summary
Public Members | ||
public |
|
Method Summary
Public Methods | ||
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 Methods
public abstract apply_on_server(arg_server: object): nothing source
Apply authentication plugin io given server. Use a middleware.
Params:
Name | Type | Attribute | Description |
arg_server | object | Runtime server (Express/Restify server for example) |
Return:
nothing |
public abstract authenticate(arg_credentials: Credentials | undefined): object source
Authenticate a user with request credentials.
Params:
Name | Type | Attribute | Description |
arg_credentials | Credentials | undefined | request credentials object. |
public abstract 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 abstract disable(arg_settings: object | undefined): object source
Disable authentication plugin with contextual informations.
public abstract enable(arg_settings: object | undefined): object source
Enable authentication plugin with contextual informations.