From 4dfccb6c44de89505029cbf9bdf19d05276d14fe Mon Sep 17 00:00:00 2001 From: ricardo Date: Mon, 24 Jul 2023 10:05:56 -0400 Subject: [PATCH] remove base class --- packages/cli/src/services/jwt.service.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/cli/src/services/jwt.service.ts b/packages/cli/src/services/jwt.service.ts index 5b6eb185428f1..094b595d8d832 100644 --- a/packages/cli/src/services/jwt.service.ts +++ b/packages/cli/src/services/jwt.service.ts @@ -7,19 +7,11 @@ export class JwtService { private readonly userManagementSecret = config.getEnv('userManagement.jwtSecret'); public signData(payload: object, options: jwt.SignOptions = {}): string { - return this.sign(payload, this.userManagementSecret, options); + return jwt.sign(payload, this.userManagementSecret, options); } public verifyToken(token: string, options: jwt.VerifyOptions = {}) { - return this.verify(token, this.userManagementSecret, options); - } - - private sign(payload: object, secret: string, options: jwt.SignOptions = {}) { - return jwt.sign(payload, secret, options); - } - - private verify(token: string, secret: string, options: jwt.VerifyOptions = {}) { - return jwt.verify(token, secret, options) as jwt.JwtPayload; + return jwt.verify(token, this.userManagementSecret, options) as jwt.JwtPayload; } }