Skip to main content

TotpParameters

@webda/auth


Class: TotpParameters

Defined in: packages/auth/src/mfa/totp.service.ts:5

Parameters for TOTP service

Extends​

Constructors​

Constructor​

new TotpParameters(): TotpParameters

Returns​

TotpParameters

Inherited from​

SecondFactorParameters.constructor

Properties​

algorithm​

algorithm: "sha1" | "sha256" | "sha512" = "sha1"

Defined in: packages/auth/src/mfa/totp.service.ts:9

HMAC hash algorithm (default "sha1")


digits​

digits: 6 | 8 = 6

Defined in: packages/auth/src/mfa/totp.service.ts:11

Number of digits (default 6)


issuer?​

optional issuer?: string

Defined in: packages/auth/src/mfa/totp.service.ts:7

Application name / issuer shown in authenticator apps (defaults to application name)


period​

period: number = 30

Defined in: packages/auth/src/mfa/totp.service.ts:13

Time step in seconds (default 30)


recoveryCodes​

recoveryCodes: number = 10

Defined in: packages/auth/src/mfa/secondfactor.service.ts:15

Number of recovery codes generated (default 10, 0 disables recovery codes)

Inherited from​

SecondFactorParameters.recoveryCodes


throttle​

throttle: ThrottleParameters

Defined in: packages/auth/src/mfa/secondfactor.service.ts:13

Throttle config for failed attempts

Inherited from​

SecondFactorParameters.throttle


type​

type: string

Defined in: packages/core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

SecondFactorParameters.type


window​

window: number = 1

Defined in: packages/auth/src/mfa/totp.service.ts:15

Accepted drift window in time steps (default 1)

Methods​

load()​

load(params?): this

Defined in: packages/core/lib/application/parameters.d.ts:14

Load raw parameters by assigning them onto this instance

Parameters​

params?​

any

the service parameters

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.load


update()​

update(params, delta): this

Defined in: packages/core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.update


with()​

with(callback): this

Defined in: packages/core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.with