Socket
Socket
Sign inDemoInstall

@connectedcars/jwtutils

Package Overview
Dependencies
0
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.21 to 1.0.22

32

package.json
{
"name": "@connectedcars/jwtutils",
"version": "1.0.21",
"version": "1.0.22",
"description": "Zero dependency JWT encoding/decoding for Node",

@@ -37,21 +37,21 @@ "main": "src/index.js",

"@types/mocha": "^5.2.6",
"@types/node": "^11.9.4",
"@types/tmp": "0.0.34",
"@types/node": "^12.0.3",
"@types/tmp": "0.1.0",
"babel-eslint": "^10.0.1",
"benchmark": "^2.1.4",
"coveralls": "^3.0.2",
"eslint": "^5.14.1",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"express": "^4.16.4",
"coveralls": "^3.0.3",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"express": "^4.17.1",
"microtime": "^3.0.0",
"mocha": "^6.0.0",
"nyc": "^13.3.0",
"prettier": "^1.16.4",
"mocha": "^6.1.4",
"nyc": "^14.1.1",
"prettier": "^1.17.1",
"r2": "^2.0.1",
"tmp": "0.0.33",
"typescript": "^3.3.3",
"unexpected": "^11.0.1",
"dtslint": "^0.4.2"
"tmp": "0.1.0",
"typescript": "^3.5.1",
"unexpected": "^11.6.0",
"dtslint": "^0.7.7"
},

@@ -58,0 +58,0 @@ "nyc": {

@@ -1,13 +0,8 @@

// @ts-check
'use strict'
function JwtVerifyError(message, innerError) {
this.name = 'JwtVerifyError'
this.message = message
this.stack = new Error().stack
this.innerError = innerError || null
class JwtVerifyError extends Error {
constructor(message, innerError = null) {
super(message)
this.innerError = innerError
}
}
JwtVerifyError.prototype = Object.create(Error.prototype)
JwtVerifyError.prototype.constructor = JwtVerifyError
module.exports = JwtVerifyError
// TypeScript Version: 3.0
export class JwtVerifyError extends Error {
innerError: Error
constructor(message: string, innerError?: Error)

@@ -14,2 +15,11 @@ }

export interface getGithubAccessTokenOptions {
expires: number
}
export interface getGoogleAccessTokenOptions {
impersonate: string
expires: number
}
export namespace JwtUtils {

@@ -50,3 +60,3 @@ function encode(privateKey: string | null, header: any, body: any, privateKeyPassword?: string): string

accessToken: string
expireIn: number
expiresIn: number
expiresAt: number

@@ -57,4 +67,7 @@ }

constructor(httpRequestHandler?: (method: string, url: string, headers: object, body: string | Buffer) => Promise<HttpHandlerResponse>)
getGithubAccessToken(privateKey: string, appId: string, installationId: string, appName: string, options: object): Promise<AccessTokenResponse>
getGithubAccessToken(privateKey: string, appId: string, installationId: string, appName: string, options?: getGithubAccessTokenOptions): Promise<AccessTokenResponse>
getGoogleAccessTokenFromGCloudHelper(): Promise<AccessTokenResponse>
static getGoogleAccessTokenFromGCloudHelper(): Promise<AccessTokenResponse>
getGoogleAccessToken(googleServiceAccount: string, scopes: string[], options?: getGoogleAccessTokenOptions): Promise<AccessTokenResponse>
static getGoogleAccessToken(googleServiceAccount: string, scopes: string[], options?: getGoogleAccessTokenOptions): Promise<AccessTokenResponse>
}

@@ -61,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc