agora-access-token
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "agora-access-token", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "", | ||
@@ -10,2 +10,3 @@ "homepage": "https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey/nodejs", | ||
}, | ||
"types": "index.d.ts", | ||
"author": "", | ||
@@ -12,0 +13,0 @@ "license": "ISC", |
@@ -15,4 +15,2 @@ //var fs = require('fs'); | ||
var expirationTimeInSeconds = 3600 | ||
var currentTimestamp = Math.floor(Date.now() / 1000) | ||
var privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds | ||
var role = RtcRole.PUBLISHER | ||
@@ -27,2 +25,4 @@ | ||
var generateRtcToken = function(req, resp) { | ||
var currentTimestamp = Math.floor(Date.now() / 1000) | ||
var privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds | ||
var channelName = req.query.channelName; | ||
@@ -44,2 +44,4 @@ // use 0 if uid is not specified | ||
var generateRtmToken = function(req, resp) { | ||
var currentTimestamp = Math.floor(Date.now() / 1000) | ||
var privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds | ||
var account = req.query.account; | ||
@@ -46,0 +48,0 @@ if (!account) { |
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
40883
19
812