FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/core / SessionOptions

Type Alias: SessionOptions

SessionOptions = object

Encryption and signing options for the Session helper.

Properties

cipherName?

optional cipherName?: string

Cipher name used to encrypt the session payload.

Default

'aes-256-cbc'

digest?

optional digest?: string

Hash algorithm used by PBKDF2 and HMAC.

Default

'sha256'

iterations?

optional iterations?: number

PBKDF2 iteration count used for key derivation.

Default

100

key?

optional key?: string

Cookie key used to store the encrypted session payload.

keylen?

optional keylen?: number

Total derived key length in bytes.

Default

64

salt?

optional salt?: string

Salt used for deriving the encryption key.

Default

'salt'

secret

secret: string

Secret source used to derive encryption and signing keys.

This must be configured explicitly. FaasJS throws during session initialization when it is missing.

signedSalt?

optional signedSalt?: string

Salt used for deriving the signing key.

Default

'signedSalt'