Skip to content

Commit 592650a

Browse files
committed
Fix debug usage
1 parent 16c08d3 commit 592650a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JwtHandler.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ export class JwtHandler {
8888
throw new jwt.JsonWebTokenError("Empty JWT")
8989
}
9090
const keyId = await this.extractKeyId(jwtRaw)
91-
debug("verify, key id: " + keyId)
91+
this.debug("verify, key id: " + keyId)
9292
if (this.pubkeyResolver) {
9393
const certData = await this.pubkeyResolver(keyId)
9494
if (!certData) {
9595
throw new UnknownKeyIdError(keyId)
9696
}
97-
debug("cert found")
97+
this.debug("cert found")
9898
return this.jwtVerifyAsync<T>(jwtRaw, certData.cert, options)
9999
}
100100
throw new Error("No public key resolver specified")
@@ -108,13 +108,13 @@ export class JwtHandler {
108108
* @return {Promise<Object, JsonWebTokenError>} Promise to the JWT body
109109
*/
110110
public async create(tokenBody: string | Buffer | { [key: string]: any }, keyId: string): Promise<string> {
111-
debug("create, key id: " + keyId)
111+
this.debug("create, key id: " + keyId)
112112
if (this.privkeyResolver) {
113113
const signingKey = await this.privkeyResolver(keyId)
114114
if (!signingKey) {
115115
throw new UnknownKeyIdError("Unknown key id")
116116
}
117-
debug("priv key found")
117+
this.debug("priv key found")
118118
return this.jwtSignAsync(tokenBody, signingKey, {algorithm: signingKey.alg, header: {kid: keyId}})
119119
}
120120
throw new Error("No private key resolver specified")

0 commit comments

Comments
 (0)