Skip to main content

TokenServiceParameters

@webda/core


Class: TokenServiceParameters

Defined in: packages/core/src/services/token.service.ts:96

TokenService parameters

Extends​

Constructors​

Constructor​

new TokenServiceParameters(): TokenServiceParameters

Returns​

TokenServiceParameters

Inherited from​

ServiceParameters.constructor

Properties​

accessTtl​

accessTtl: number

Defined in: packages/core/src/services/token.service.ts:101

Access token lifetime in seconds

Default​

900

refreshGrace​

refreshGrace: number

Defined in: packages/core/src/services/token.service.ts:124

Seconds during which a rotated refresh token presented again is rotated once more, as long as the token it was exchanged for was never used: a client that lost the answer of its refresh (laptop asleep, network drop) retries with the token it still holds instead of losing its session. The unused replacement is retired; if it is presented later anyway (two holders), the family is revoked. 0 disables it: any replay revokes the family

Default​

86400

refreshTtl​

refreshTtl: number

Defined in: packages/core/src/services/token.service.ts:106

Refresh token lifetime in seconds

Default​

2592000

revocationCacheTtl​

revocationCacheTtl: number

Defined in: packages/core/src/services/token.service.ts:116

Seconds a "not revoked" answer is cached: bounds how long a revocation done by another instance can be missed

Default​

10

revocationCheck​

revocationCheck: boolean

Defined in: packages/core/src/services/token.service.ts:111

Reject access tokens whose family or user was revoked

Default​

true

type​

type: string

Defined in: packages/core/src/services/serviceparameters.ts:10

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

Defined in: packages/core/src/services/token.service.ts:130

Parameters​

params?​

any = {}

raw parameters

Returns​

this

this

Overrides​

ServiceParameters.load


update()​

update(params?, delta): this

Defined in: packages/core/src/application/parameters.ts:33

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​

ServiceParameters.update


with()​

with(callback): this

Defined in: packages/core/src/application/parameters.ts:63

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​

ServiceParameters.with