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

floca

Package Overview
Dependencies
Maintainers
2
Versions
229
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

floca - npm Package Compare versions

Comparing version 5.6.16 to 5.6.17

41

lib/Server.js

@@ -231,28 +231,27 @@ let http = require('http')

self.verifyJwtToken( token )
.then( (decoded) => {
if ( self.config.server.jwt.decode )
decoded = self.config.server.jwt.decode( decoded )
try {
let decoded = self.verifyJwtToken( token )
if ( self.config.server.jwt.decode )
decoded = self.config.server.jwt.decode( decoded )
if ( acquiring ) {
if ( decoded.issueDate < Date.now() - self.config.server.jwt.timeout )
throw new Error( 'Session timed out' )
if ( acquiring ) {
if ( decoded.issueDate < Date.now() - self.config.server.jwt.timeout )
throw new Error( 'Session timed out' )
return next()
}
return next()
}
req.user = decoded
req.user = decoded
if ( self.config.server.jwt.checkValidity )
self.config.server.jwt.checkValidity( req.url, decoded )
if ( self.config.server.jwt.checkValidity )
self.config.server.jwt.checkValidity( req.url, decoded )
next( )
} )
.catch( () => {
for (let key in self.originHeaders)
res.setHeader( key, self.originHeaders[key] )
res.setHeader( 'Content-type', 'text/plain' )
res.statusCode = 401
res.end( 'Invalid or missing token.' )
} )
next( )
} catch ( err ) {
for (let key in self.originHeaders)
res.setHeader( key, self.originHeaders[key] )
res.setHeader( 'Content-type', 'text/plain' )
res.statusCode = 401
res.end( 'Invalid or missing token.' )
}
} )

@@ -259,0 +258,0 @@

{
"name": "floca",
"version": "5.6.16",
"version": "5.6.17",
"description": "Enterprise-grade microservice solution for NodeJS",

@@ -5,0 +5,0 @@ "keywords": [

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