Skip to content

SudoSOS Back-end API / internal/services / QRService

Class: QRService ​

Extends ​

Constructors ​

Constructor ​

ts
new QRService(manager?): QRService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

QRService

Inherited from ​

WithManager.constructor

Properties ​

PropertyModifierTypeInherited from
managerprotectedEntityManagerWithManager.manager

Methods ​

cancel() ​

ts
cancel(qr): Promise<void>;

Cancels a QR authenticator.

Parameters ​

ParameterTypeDescription
qrQRAuthenticatorThe QR authenticator to cancel.

Returns ​

Promise<void>


confirm() ​

ts
confirm(qr, user): Promise<void>;

Confirms a QR authenticator for a given user.

Parameters ​

ParameterTypeDescription
qrQRAuthenticatorThe QR authenticator to confirm.
userUserThe 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 ​

ParameterTypeDescription
sessionIdstringThe session identifier.

Returns ​

Promise<QRAuthenticator>

The found QR authenticator or null.