Skip to content

Commit

Permalink
add "expiry" option to typescript definitions (#224)
Browse files Browse the repository at this point in the history
Closes #223
  • Loading branch information
jsprw committed Apr 17, 2024
1 parent ac155b8 commit 4649e3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ declare namespace fastifySecureSession {
cookie?: CookieSerializeOptions
cookieName?: string
sessionName?: string
expiry?: number
} & ({ key: string | Buffer | (string | Buffer)[] } | {
secret: string | Buffer,
salt: string | Buffer
Expand Down
1 change: 1 addition & 0 deletions types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ app.register(SecureSessionPlugin, { key: Buffer.from("foo") });
app.register(SecureSessionPlugin, { key: ["foo", "bar"] });
app.register(SecureSessionPlugin, { secret: "foo", salt: "bar" });
app.register(SecureSessionPlugin, { sessionName: "foo", key: "bar" });
app.register(SecureSessionPlugin, { expiry: 24 * 60 * 60, key: "bar" });
app.register(SecureSessionPlugin, [{ sessionName: "foo", key: "bar" }, { sessionName: "bar", key: "bar" }]);

declare module ".." {
Expand Down

0 comments on commit 4649e3d

Please sign in to comment.