SudoSOS Back-end API / internal/services / QRService
Class: QRService ​
Extends ​
Constructors ​
Constructor ​
ts
new QRService(manager?): QRService;Parameters ​
| Parameter | Type |
|---|---|
manager? | EntityManager |
Returns ​
QRService
Inherited from ​
Properties ​
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
manager | protected | EntityManager | WithManager.manager |
Methods ​
cancel() ​
ts
cancel(qr): Promise<void>;Cancels a QR authenticator.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
qr | QRAuthenticator | The QR authenticator to cancel. |
Returns ​
Promise<void>
confirm() ​
ts
confirm(qr, user): Promise<void>;Confirms a QR authenticator for a given user.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
qr | QRAuthenticator | The QR authenticator to confirm. |
user | User | The user to associate with the authenticator. |
Returns ​
Promise<void>
create() ​
ts
create(): Promise<QRAuthenticator>;Creates and saves a new QR authenticator.
Returns ​
Promise<QRAuthenticator>
The created QR authenticator.
get() ​
ts
get(sessionId): Promise<QRAuthenticator>;Fetches a QR authenticator by session ID.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
sessionId | string | The session identifier. |
Returns ​
Promise<QRAuthenticator>
The found QR authenticator or null.