New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/secure-session

Package Overview
Dependencies
Maintainers
19
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/secure-session - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

test/touch.js

4

index.js

@@ -301,2 +301,6 @@ 'use strict'

}
touch () {
this.changed = true
}
}

@@ -303,0 +307,0 @@

2

package.json
{
"name": "@fastify/secure-session",
"version": "7.0.0",
"version": "7.1.0",
"description": "Create a secure stateless cookie session for Fastify",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -80,2 +80,11 @@ # @fastify/secure-session

fastify.get('/ping', (request, reply) => {
request.session.options({maxAge: 3600})
// Send the session cookie to the client even if the session data didn't change
// can be used to update cookie expiration
request.session.touch()
reply.send('pong')
})
fastify.post('/logout', (request, reply) => {

@@ -207,3 +216,3 @@ request.session.delete()

fastify.register(require('@fastify/secure-session'), {
key: [mySecureKey]
key: [mySecureKey],

@@ -224,3 +233,3 @@ cookie: {

fastify.register(require('@fastify/secure-session'), {
key: [myNewKey, mySecureKey]
key: [myNewKey, mySecureKey],

@@ -227,0 +236,0 @@ cookie: {

@@ -29,2 +29,3 @@ /// <reference types="node" />

options(opts: CookieSerializeOptions): void;
touch(): void;
}

@@ -31,0 +32,0 @@

@@ -46,2 +46,3 @@ import SecureSessionPlugin, { Session, SessionData } from "..";

request.session.options({ maxAge: 42 })
request.session.touch();

@@ -53,2 +54,3 @@ request.foo.set("foo", "bar");

request.foo.options({ maxAge: 42 });
request.foo.touch();
});

@@ -55,0 +57,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