@swrve/smarttv-sdk
Version:
Swrve marketing engagement platform SDK for SmartTV OTT devices
11 lines (10 loc) • 420 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSessionToken = void 0;
const md5_1 = require("./md5");
function getSessionToken(userId, appId, apiKey, date) {
const seconds = Math.round(date.getTime() / 1000);
const hash = md5_1.md5Sync(userId + seconds + apiKey);
return appId + "=" + userId + "=" + seconds + "=" + hash;
}
exports.getSessionToken = getSessionToken;