TokenServiceParameters
Class: TokenServiceParameters
Defined in: packages/core/src/services/token.service.ts:153
TokenService parameters
Extends
Constructors
Constructor
new TokenServiceParameters():
TokenServiceParameters
Returns
TokenServiceParameters
Inherited from
Properties
accessTtl
accessTtl:
number
Defined in: packages/core/src/services/token.service.ts:158
Access token lifetime in seconds
Default
900
refreshGrace
refreshGrace:
number
Defined in: packages/core/src/services/token.service.ts:181
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
refreshReuseInterval
refreshReuseInterval:
number
Defined in: packages/core/src/services/token.service.ts:189
Seconds after a rotation during which the rotated refresh token presented again gets another valid token of the
family, without retiring the first replacement nor revoking anything: refreshes racing with the same token (a
client running several instances that share their stored credentials) all succeed. After it, refreshGrace and
reuse detection apply. 0 disables it: of concurrent refreshes, only one succeeds and the family is revoked
Default
10
refreshTtl
refreshTtl:
number
Defined in: packages/core/src/services/token.service.ts:163
Refresh token lifetime in seconds
Default
2592000
revocationCacheTtl
revocationCacheTtl:
number
Defined in: packages/core/src/services/token.service.ts:173
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:168
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
Methods
load()
load(
params?):this
Defined in: packages/core/src/services/token.service.ts:196
Load operation
Parameters
params?
any = {}
raw parameters
Returns
this
this
Overrides
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
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