Reference Source
public class | source

AuthenticationPluginPassport

Extends:

js/security/todo/authentication_plugin.js~AuthenticationPlugin → AuthenticationPluginPassport

Authentication base class for Passport strategies.

Constructor Summary

Public Constructor
public

constructor(arg_name: string, arg_class: string, arg_log_context: string | undefined): nothing

Create an Authentication class for all Passport strategies.

Member Summary

Public Members
public
public
public
public
public
public
public
public
public
public

Method Summary

Public Methods
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.

Public Constructors

public constructor(arg_name: string, arg_class: string, arg_log_context: string | undefined): nothing source

Create an Authentication class for all Passport strategies.

Params:

NameTypeAttributeDescription
arg_name string

plugin name.

arg_class string

plugin class name.

arg_log_context string | undefined

optional.

Return:

nothing

Public Members

public failure_redirect: * source

public id_fieldname: * source

public is_authentication: boolean source

public passport: * source

public password_fieldname: * source

public strategies: {} source

public strategies_names: *[] source

public success_redirect: * source

public use_session: * source

public username_fieldname: * source

Public Methods

public add_local_strategy() source

public abstract add_strategy(arg_name: *, arg_instance: *): object source

Get Passport strategy provided by this class.

Params:

NameTypeAttributeDescription
arg_name *
arg_instance *

Return:

object

Passport strategy instance

public apply_on_server(arg_server: object): nothing source

Apply authentication plugin io given server. Use a middleware.

Params:

NameTypeAttributeDescription
arg_server object

Runtime server (Express/Restify server for example)

Return:

nothing

public create_middleware(): function source

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

Return:

function

function(request,response,next){...}

public create_route_middleware(): function source

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

Return:

function

function(request,response){...}

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

Disable authentication plugin with contextual informations.

Params:

NameTypeAttributeDescription
arg_settings object | undefined

optional contextual settings.

Return:

object

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

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

Enable authentication plugin with contextual informations.

Params:

NameTypeAttributeDescription
arg_settings object | undefined

optional contextual settings.

Return:

object

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