Skip to content

SudoSOS Back-end API / authentication / MemberAuthenticationController

Class: MemberAuthenticationController ​

The member authentication controller is responsible for:

  • Verifying member user authentications by memberId.
  • Handing out json web tokens.

Extends ​

Constructors ​

Constructor ​

ts
new MemberAuthenticationController(options, tokenHandler): MemberAuthenticationController;

Creates a new member authentication controller instance.

Parameters ​

ParameterTypeDescription
optionsBaseControllerOptionsThe options passed to the base controller.
tokenHandlerTokenHandlerThe token handler for creating signed tokens.

Returns ​

MemberAuthenticationController

Overrides ​

BaseController.constructor

Properties ​

PropertyModifierTypeDescriptionInherited from
roleManagerprotectedRoleManagerA reference to the role manager passed in the base controller options.BaseController.roleManager
specificationpublicSwaggerSpecificationA reference to the swagger specification passed in the base controller options.BaseController.specification

Methods ​

getPolicy() ​

ts
getPolicy(): Policy;

Gets the policy defined by child classes. This policy includes all routes that the controller accepts, the authorization middleware, and the final handler function for every route.

Returns ​

Policy

The policy of this controller.

Overrides ​

BaseController.getPolicy


getRouter() ​

ts
getRouter(): Router;

Returns ​

Router

the router used by this controller.

Inherited from ​

BaseController.getRouter


memberPINLogin() ​

ts
memberPINLogin(req, res): Promise<void>;

POST /authentication/member/pin

Parameters ​

ParameterType
reqRequest
resResponse

Returns ​

Promise<void>

200 - The created json web token.

Deprecated ​

Use /authentication/member/pin-secure instead

Operation Id ​

memberPinAuthentication

Tags ​

authenticate - Operations of authentication controller