@feathersjs/authentication-local
Advanced tools
Comparing version 4.5.2 to 4.5.3
@@ -6,2 +6,10 @@ # Change Log | ||
## [4.5.3](https://github.com/feathersjs/feathers/compare/v4.5.2...v4.5.3) (2020-04-17) | ||
**Note:** Version bump only for package @feathersjs/authentication-local | ||
## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04) | ||
@@ -8,0 +16,0 @@ |
@@ -15,3 +15,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const lodash_1 = require("lodash"); | ||
const get_1 = __importDefault(require("lodash/get")); | ||
const set_1 = __importDefault(require("lodash/set")); | ||
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep")); | ||
const errors_1 = require("@feathersjs/errors"); | ||
@@ -29,3 +31,3 @@ const debug_1 = __importDefault(require("debug")); | ||
const { app, data, params } = context; | ||
const password = lodash_1.get(data, field); | ||
const password = get_1.default(data, field); | ||
if (data === undefined || password === undefined) { | ||
@@ -45,3 +47,3 @@ debug(`hook.data or hook.data.${field} is undefined. Skipping hashPassword hook.`); | ||
const hashedPassword = yield localStrategy.hashPassword(password, params); | ||
context.data = lodash_1.set(lodash_1.cloneDeep(data), field, hashedPassword); | ||
context.data = set_1.default(cloneDeep_1.default(data), field, hashedPassword); | ||
return context; | ||
@@ -48,0 +50,0 @@ }); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const lodash_1 = require("lodash"); | ||
const omit_1 = __importDefault(require("lodash/omit")); | ||
exports.default = (...fields) => (context) => { | ||
@@ -9,3 +12,3 @@ const result = context.dispatch || context.result; | ||
? current.toJSON() : current; | ||
return lodash_1.omit(data, fields); | ||
return omit_1.default(data, fields); | ||
}; | ||
@@ -12,0 +15,0 @@ if (!result) { |
@@ -16,3 +16,4 @@ "use strict"; | ||
const bcryptjs_1 = __importDefault(require("bcryptjs")); | ||
const lodash_1 = require("lodash"); | ||
const get_1 = __importDefault(require("lodash/get")); | ||
const omit_1 = __importDefault(require("lodash/omit")); | ||
const debug_1 = __importDefault(require("debug")); | ||
@@ -80,3 +81,3 @@ const errors_1 = require("@feathersjs/errors"); | ||
// find password in entity, this allows for dot notation | ||
const hash = lodash_1.get(entity, entityPasswordField); | ||
const hash = get_1.default(entity, entityPasswordField); | ||
if (!hash) { | ||
@@ -104,3 +105,3 @@ debug(`Record is missing the '${entityPasswordField}' password field`); | ||
const password = data[passwordField]; | ||
const result = yield this.findEntity(username, lodash_1.omit(params, 'provider')); | ||
const result = yield this.findEntity(username, omit_1.default(params, 'provider')); | ||
yield this.comparePassword(result, password); | ||
@@ -107,0 +108,0 @@ return { |
{ | ||
"name": "@feathersjs/authentication-local", | ||
"description": "Local authentication strategy for @feathers/authentication", | ||
"version": "4.5.2", | ||
"version": "4.5.3", | ||
"homepage": "https://feathersjs.com", | ||
@@ -46,5 +46,5 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/authentication": "^4.5.2", | ||
"@feathersjs/errors": "^4.5.2", | ||
"@feathersjs/feathers": "^4.5.2", | ||
"@feathersjs/authentication": "^4.5.3", | ||
"@feathersjs/errors": "^4.5.3", | ||
"@feathersjs/feathers": "^4.5.3", | ||
"bcryptjs": "^2.4.3", | ||
@@ -58,10 +58,10 @@ "debug": "^4.1.1", | ||
"@types/lodash": "^4.14.149", | ||
"@types/mocha": "^7.0.1", | ||
"@types/node": "^13.7.4", | ||
"mocha": "^7.0.1", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^13.11.1", | ||
"mocha": "^7.1.1", | ||
"shx": "^0.3.2", | ||
"ts-node": "^8.6.2", | ||
"typescript": "^3.8.2" | ||
"ts-node": "^8.8.2", | ||
"typescript": "^3.8.3" | ||
}, | ||
"gitHead": "9d5871e98d821384dee70b8d3d9af4002f3d052a" | ||
"gitHead": "251ba63ceec7c203e05335f9849192a32ef66a0a" | ||
} |
@@ -1,2 +0,4 @@ | ||
import { get, set, cloneDeep } from 'lodash'; | ||
import get from 'lodash/get'; | ||
import set from 'lodash/set'; | ||
import cloneDeep from 'lodash/cloneDeep'; | ||
import { BadRequest } from '@feathersjs/errors'; | ||
@@ -3,0 +5,0 @@ import Debug from 'debug'; |
@@ -1,2 +0,2 @@ | ||
import { omit } from 'lodash'; | ||
import omit from 'lodash/omit'; | ||
import { HookContext } from '@feathersjs/feathers'; | ||
@@ -3,0 +3,0 @@ |
import bcrypt from 'bcryptjs'; | ||
import { get, omit } from 'lodash'; | ||
import get from 'lodash/get'; | ||
import omit from 'lodash/omit'; | ||
import Debug from 'debug'; | ||
@@ -4,0 +5,0 @@ import { NotAuthenticated } from '@feathersjs/errors'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
286417
1435