Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/express-session

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/express-session - npm Package Compare versions

Comparing version 1.18.0 to 1.18.1

23

express-session/index.d.ts
import express = require("express");
import { CipherKey } from "crypto";
import { EventEmitter } from "events";

@@ -42,10 +43,11 @@

/**
* This is the secret used to sign the session cookie. This can be either a string for a single secret, or an array of multiple secrets.
* If an array of secrets is provided, **only the first element will be used to sign** the session ID cookie,
* while **all the elements will be considered when verifying the signature** in requests.
* The secret itself should be not easily parsed by a human and would best be a random set of characters
* This is the secret used to sign the session ID cookie.
* The secret can be any type of value that is supported by Node.js `crypto.createHmac` (like a string or a Buffer).
* This can be either a single secret, or an array of multiple secrets.
* If an array of secrets is provided, only the first element will be used to sign the session ID cookie, while all the elements will be considered when verifying the signature in requests.
* The secret itself should be not easily parsed by a human and would best be a random set of characters.
*
* Best practices may include:
* - The use of environment variables to store the secret, ensuring the secret itself does not exist in your repository.
* - Periodic updates of the secret, while ensuring the previous secret is in the array.
* A best practice may include:
* * The use of environment variables to store the secret, ensuring the secret itself does not exist in your repository.
* * Periodic updates of the secret, while ensuring the previous secret is in the array.
*

@@ -55,6 +57,7 @@ * Using a secret that cannot be guessed will reduce the ability to hijack a session to only guessing the session ID (as determined by the `genid` option).

* Changing the secret value will invalidate all existing sessions.
* In order to rotate the secret without invalidating sessions, provide an array of secrets,
* with the new secret as first element of the array, and including previous secrets as the later elements.
* In order to rotate the secret without invalidating sessions, provide an array of secrets, with the new secret as first element of the array, and including previous secrets as the later elements.
*
* Note HMAC-256 is used to sign the session ID. For this reason, the secret should contain at least 32 bytes of entropy.
*/
secret: string | string[];
secret: CipherKey | CipherKey[];

@@ -61,0 +64,0 @@ /**

{
"name": "@types/express-session",
"version": "1.18.0",
"version": "1.18.1",
"description": "TypeScript definitions for express-session",

@@ -55,4 +55,5 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-session",

},
"typesPublisherContentHash": "d2eafc3037eb746a0592bb0ff07e6ab9e965e6460f319eecb844a696b4e4850f",
"typeScriptVersion": "4.6"
"peerDependencies": {},
"typesPublisherContentHash": "903769a1d7f0f7d2ee2636656c9dc8235c21222b2e63e28f81da2ab3523d97ff",
"typeScriptVersion": "5.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 26 Feb 2024 20:07:44 GMT
* Last updated: Tue, 26 Nov 2024 11:02:37 GMT
* Dependencies: [@types/express](https://npmjs.com/package/@types/express)

@@ -14,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc