Reference Source
public class | source

AuthenticationPluginPassportLocalFile

Extends:

js/security/todo/authentication_plugin.js~AuthenticationPluginAuthenticationPluginPassportAuthenticationPluginPassportLocal → AuthenticationPluginPassportLocalFile

Authentication class for Passport Local file strategy.

Constructor Summary

Public Constructor
public

constructor(arg_log_context: string | undefined): nothing

Create an Authentication plugin class based on passport local file strategy.

Member Summary

Public Members
public
public

file_db: *

public
public

Method Summary

Public Methods
public

authenticate(arg_credentials: object | undefined): object

Authenticate a user with a file giving request credentials.

public

enable(arg_settings: object | undefined): object

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 AuthenticationPluginPassport
public
public
public
public
public
public
public
public
public
public
public
public abstract

add_strategy(arg_name: *, arg_instance: *): object

Get Passport strategy provided by this class.

public

apply_on_server(arg_server: object): nothing

Apply authentication plugin io given server.

public

Get a authentication middleware to use on servers (see Connect/Express middleware signature).

public

Get a authentication route middleware to use on servers (see Connect/Express middleware signature).

public

disable(arg_settings: object | undefined): object

Disable authentication plugin with contextual informations.

public

enable(arg_settings: object | undefined): object

Enable authentication plugin with contextual informations.

From class AuthenticationPluginPassportLocal
public
public

Get Passport strategy provided by this class.

public

Get Passport strategy name provided by this class.

Public Constructors

public constructor(arg_log_context: string | undefined): nothing source

Create an Authentication plugin class based on passport local file strategy.

Override:

AuthenticationPluginPassportLocal#constructor

Params:

NameTypeAttributeDescription
arg_log_context string | undefined

optional.

Return:

nothing

Public Members

public file_adapter: * source

public file_db: * source

public file_name: * source

public is_authentication_passport_local_file: boolean source

Public Methods

public authenticate(arg_credentials: object | undefined): object source

Authenticate a user with a file giving request credentials.

Params:

NameTypeAttributeDescription
arg_credentials object | undefined

request credentials object

Return:

object

a promise of boolean

public enable(arg_settings: object | undefined): object source

Enable authentication plugin with contextual informations.

Override:

AuthenticationPluginPassport#enable

Params:

NameTypeAttributeDescription
arg_settings object | undefined

optional contextual settings.

Return:

object

a promise object of a boolean result (success:true, failure:false)

public get_user_by_id(arg_user_id: string): string source

Get user record by its id.

Params:

NameTypeAttributeDescription
arg_user_id string

user id

Return:

string

user id

public get_user_id(arg_user_record: object): string source

Get user id from a user record.

Params:

NameTypeAttributeDescription
arg_user_record object

user record object

Return:

string

user id