Skip to content

Commit

Permalink
remove base class
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 committed Jul 24, 2023
1 parent a3ae72d commit 4dfccb6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/cli/src/services/jwt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 4dfccb6

Please sign in to comment.