mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
[express-session]: Allow secret to be an array
From [the readme](https://github.com/expressjs/session#secret): > This is the secret used to sign the session ID 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.
This commit is contained in:
Vendored
+4
-2
@@ -1,6 +1,8 @@
|
||||
// Type definitions for express-session 1.15
|
||||
// Project: https://www.npmjs.org/package/express-session
|
||||
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>, Jacob Bogers <https://github.com/jacobbogers>
|
||||
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
|
||||
// Jacob Bogers <https://github.com/jacobbogers>
|
||||
// Ryan Cannon <https://github.com/ry7n>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -51,7 +53,7 @@ declare function session(options?: session.SessionOptions): express.RequestHandl
|
||||
|
||||
declare namespace session {
|
||||
interface SessionOptions {
|
||||
secret: string;
|
||||
secret: string | string[];
|
||||
name?: string;
|
||||
store?: Store | MemoryStore;
|
||||
cookie?: express.CookieOptions;
|
||||
|
||||
Reference in New Issue
Block a user