Skip to main content

@webda/coreReadme | API


Interface: JWTOptions

JWT Options

Properties

algorithm?

algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512" | "ES256" | "ES384" | "ES512"

Algorithm for JWT token

See

https://www.npmjs.com/package/jsonwebtoken

Default

"HS256"

Source

packages/core/src/services/cryptoservice.ts:91


audience?

audience?: string

Audience for the jwt

Source

packages/core/src/services/cryptoservice.ts:114


expiresIn?

expiresIn?: string | number

expressed in seconds or a string describing a time span zeit/ms.

Eg: 60, "2 days", "10h", "7d". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default ("120" is equal to "120ms").

Source

packages/core/src/services/cryptoservice.ts:110


issuer?

issuer?: string

Issuer of the token

Source

packages/core/src/services/cryptoservice.ts:118


keyid?

keyid?: any

Source

packages/core/src/services/cryptoservice.ts:123


secretOrPublicKey?

secretOrPublicKey?: string | Buffer | Object

Secret to use with JWT

Source

packages/core/src/services/cryptoservice.ts:84


subject?

subject?: string

Subject for JWT

Source

packages/core/src/services/cryptoservice.ts:122