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

multicolour-hapi-jwt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multicolour-hapi-jwt - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

11

index.js
"use strict"
const Joi = require("joi")
const boom = require("boom")

@@ -106,7 +107,7 @@ /**

if (err) {
get_decorator_for_apply_value(reply, method)(err, models.multicolour_user)
reply(boom.wrap(err))
}
// Check a user for that email exists and the passwords match.
else if (!user) {
get_decorator_for_apply_value(reply, method)(new Error("Invalid login."), models.multicolour_user).code(403)
reply(boom.unauthorized("Invalid login."))
}

@@ -118,3 +119,3 @@ // We're good to create a session.

if (user.password !== hashed_password) {
return get_decorator_for_apply_value(reply, method)(new Error("Invalid login."), models.multicolour_user).code(403)
return reply(boom.unauthorized("Invalid login."))
}

@@ -137,6 +138,6 @@

if (err) {
get_decorator_for_apply_value(reply, method)(err, models.session)
reply(boom.unauthorized("Invalid login."))
}
else {
get_decorator_for_apply_value(reply, method)(session, models.session).code(202)
get_decorator_for_apply_value(reply, method)(session, models.session)
}

@@ -143,0 +144,0 @@ })

{
"name": "multicolour-hapi-jwt",
"version": "0.1.1",
"version": "0.1.2",
"description": "JWT Auth plugin for HapiJS Multicolour",

@@ -33,2 +33,3 @@ "main": "index.js",

"istanbul": "^0.3.22",
"multicolour": "^0.4.3",
"nodemon": "^1.7.1",

@@ -39,2 +40,3 @@ "tap-spec": "^4.1.0",

"dependencies": {
"boom": "^4.0.0",
"hapi-auth-jwt2": "^5.8.0",

@@ -41,0 +43,0 @@ "joi": "^8.0.5",

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