Skip to content

Commit

Permalink
Remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
wcalderipe committed May 7, 2024
1 parent 56bb8cc commit be3eb5c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@ export class OpenPolicyAgentEngine implements Engine<OpenPolicyAgentEngine> {
cnf: principalJwk
}

console.log('this.privateKey', this.privateKey)
console.log('payload', payload)

return signJwt(payload, this.privateKey, { alg: SigningAlg.EIP191 })
}
}
2 changes: 0 additions & 2 deletions apps/vault/src/shared/guard/authorization.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ export class AuthorizationGuard implements CanActivate {
}

// Validate the JWT has a valid signature for the expected client key & the request matches

console.log('Validating token', token)
const { payload } = await verifyJwt(token, clientJwk, {
...opts,
requestHash: request
Expand Down
2 changes: 2 additions & 0 deletions examples/basic/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-console */

import { createArmoryConfig, evaluate, importPrivateKey, signRequest } from '@narval/armory-sdk'
import { SignMessageAction, SignTransactionAction, SignTypedDataAction } from '@narval/policy-engine-shared'
import { privateKeyToJwk } from '@narval/signature'
Expand Down
4 changes: 0 additions & 4 deletions packages/signature/src/lib/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ export const verifyEip191 = async (sig: Hex, msg: string, jwk: PublicKey): Promi

if (isSecp256k1PublicKeyJwk(jwk)) {
isValid = await verifySecp256k1(sig, msgHash, jwk)
console.log('sig', sig)
console.log('jwk', jwk)
} else {
const recoveredAddress = await recoverAddress({
hash: msgHash,
Expand Down Expand Up @@ -314,8 +312,6 @@ export async function verifyJwt(jwt: string, jwk: Jwk, opts: JwtVerifyOptions =
const key = validatePublicKey(jwk)
const { header, payload, signature } = decodeJwt(jwt)

console.log('header', header)
console.log('payload', payload)
verifyJwtHeader(header, opts)

await verifySignature(jwt, key, header.alg)
Expand Down

0 comments on commit be3eb5c

Please sign in to comment.