Skip to content

SudoSOS Back-end API / internal/controllers / AuthenticationQRController

Class: AuthenticationQRController ​

The BaseController class is responsible for:

  • Storing route definitions.
  • Generating router objects based on the policy.

Extends ​

Constructors ​

Constructor ​

ts
new AuthenticationQRController(options, tokenHandler): AuthenticationQRController;

Parameters ​

ParameterType
optionsBaseControllerOptions
tokenHandlerTokenHandler

Returns ​

AuthenticationQRController

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
tokenHandlerprotectedTokenHandler--

Methods ​

generateQRCode() ​

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

POST /authentication/qr/generate

Parameters ​

ParameterType
reqRequest
resResponse

Returns ​

Promise<void>

200 - The QR code session information

Operation Id ​

generateQRCode

Tags ​

authenticate - Operations of authentication controller


getPolicy() ​

ts
getPolicy(): any;

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 ​

any

The policy of this controller.

Overrides ​

BaseController.getPolicy


getQRStatus() ​

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

GET /authentication/qr/{sessionId}/status

Parameters ​

ParameterType
reqRequest
resResponse

Returns ​

Promise<void>

200 - The session status

Operation Id ​

getQRStatus

Tags ​

authenticate - Operations of authentication controller


getRouter() ​

ts
getRouter(): Router;

Returns ​

Router

the router used by this controller.

Inherited from ​

BaseController.getRouter