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

@amplication/plugin-auth-jwt

Package Overview
Dependencies
Maintainers
8
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplication/plugin-auth-jwt - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

2

dist/templates/jwt.strategy.template.base.ts

@@ -23,3 +23,3 @@ import { UnauthorizedException } from "@nestjs/common";

const { username } = payload;
const user = await this.ENTITY_SERVICE.findOne({
const user = await this.ENTITY_SERVICE.FIND_ONE_FUNCTION({
where: { username },

@@ -26,0 +26,0 @@ });

@@ -11,7 +11,7 @@ import { UnauthorizedException } from "@nestjs/common";

beforeEach(() => {
userService.findOne.mockClear();
userService.FIND_ONE_FUNCTION.mockClear();
});
it("should throw UnauthorizedException where there is no user", async () => {
//ARRANGE
userService.findOne
userService.FIND_ONE_FUNCTION
.calledWith({ where: { username: TEST_USER.username } })

@@ -18,0 +18,0 @@ .mockReturnValue(Promise.resolve(null));

{
"name": "@amplication/plugin-auth-jwt",
"version": "1.4.5",
"version": "1.4.6",
"description": "set jwt as provider for Amplication build",

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

@@ -19,2 +19,3 @@ import { Module, DsgContext } from "@amplication/code-gen-types";

import { print } from "@amplication/code-gen-utils";
import { camelCase } from "lodash";

@@ -80,2 +81,3 @@ const jwtStrategyBasePath = join(

ENTITY_SERVICE: builders.identifier(`${entityNameToLower}Service`),
FIND_ONE_FUNCTION: builders.identifier(`${camelCase(authEntity?.name) }`)
};

@@ -82,0 +84,0 @@

@@ -17,2 +17,3 @@ import { Module, DsgContext } from "@amplication/code-gen-types";

import { print } from "@amplication/code-gen-utils";
import { camelCase } from "lodash";

@@ -69,2 +70,3 @@ const jwtStrategySpecPath = join(

ENTITY_SERVICE: builders.identifier(`${entityServiceName}`),
FIND_ONE_FUNCTION: builders.identifier(`${camelCase(authEntity?.name) }`)
};

@@ -71,0 +73,0 @@

@@ -23,3 +23,3 @@ import { UnauthorizedException } from "@nestjs/common";

const { username } = payload;
const user = await this.ENTITY_SERVICE.findOne({
const user = await this.ENTITY_SERVICE.FIND_ONE_FUNCTION({
where: { username },

@@ -26,0 +26,0 @@ });

@@ -11,7 +11,7 @@ import { UnauthorizedException } from "@nestjs/common";

beforeEach(() => {
userService.findOne.mockClear();
userService.FIND_ONE_FUNCTION.mockClear();
});
it("should throw UnauthorizedException where there is no user", async () => {
//ARRANGE
userService.findOne
userService.FIND_ONE_FUNCTION
.calledWith({ where: { username: TEST_USER.username } })

@@ -18,0 +18,0 @@ .mockReturnValue(Promise.resolve(null));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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