@cord-sdk/server
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -7,8 +7,24 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var jwt__default = /*#__PURE__*/_interopDefaultLegacy(jwt); | ||
var jwt__namespace = /*#__PURE__*/_interopNamespace(jwt); | ||
function getClientAuthToken(app_id, app_secret, payload) { | ||
return jwt__default["default"].sign({ ...payload, app_id }, app_secret, { | ||
return jwt__namespace.sign({ ...payload, app_id }, app_secret, { | ||
algorithm: 'HS512', | ||
@@ -19,3 +35,3 @@ expiresIn: '1 min', | ||
function getServerAuthToken(app_id, app_secret) { | ||
return jwt__default["default"].sign({ app_id }, app_secret, { | ||
return jwt__namespace.sign({ app_id }, app_secret, { | ||
algorithm: 'HS512', | ||
@@ -22,0 +38,0 @@ expiresIn: '1 min', |
@@ -1,2 +0,2 @@ | ||
import jwt from 'jsonwebtoken'; | ||
import * as jwt from 'jsonwebtoken'; | ||
@@ -3,0 +3,0 @@ function getClientAuthToken(app_id, app_secret, payload) { |
{ | ||
"name": "@cord-sdk/server", | ||
"description": "Server-side portion of the Cord SDK", | ||
"version": "0.0.34", | ||
"version": "0.0.35", | ||
"homepage": "https://docs.cord.com/", | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@cord-sdk/api-types": "0.0.34", | ||
"@cord-sdk/api-types": "0.0.35", | ||
"@types/jsonwebtoken": "^8.5.8", | ||
@@ -28,0 +28,0 @@ "rollup": "^2.70.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4772
55