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 ​
| Parameter | Type |
|---|---|
options | BaseControllerOptions |
tokenHandler | TokenHandler |
Returns ​
AuthenticationQRController
Overrides ​
Properties ​
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
roleManager | protected | RoleManager | A reference to the role manager passed in the base controller options. | BaseController.roleManager |
specification | public | SwaggerSpecification | A reference to the swagger specification passed in the base controller options. | BaseController.specification |
tokenHandler | protected | TokenHandler | - | - |
Methods ​
generateQRCode() ​
ts
generateQRCode(req, res): Promise<void>;POST /authentication/qr/generate
Parameters ​
| Parameter | Type |
|---|---|
req | Request |
res | Response |
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 ​
getQRStatus() ​
ts
getQRStatus(req, res): Promise<void>;GET /authentication/qr/{sessionId}/status
Parameters ​
| Parameter | Type |
|---|---|
req | Request |
res | Response |
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.