mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fixing JWT token issue for realtime analytics
This commit is contained in:
parent
85a382e16a
commit
6ee958bbe7
@ -34,8 +34,8 @@ function onRequest(context) {
|
|||||||
var deviceParam = "{\"scope\":\"stats\",\"deviceIdentifiers\":[{\"id\":\"" + device.deviceIdentifier
|
var deviceParam = "{\"scope\":\"stats\",\"deviceIdentifiers\":[{\"id\":\"" + device.deviceIdentifier
|
||||||
+ "\", \"type\":\"" + device.type + "\"}]}";
|
+ "\", \"type\":\"" + device.type + "\"}]}";
|
||||||
var encodedScope = tokenUtil.encode(deviceParam);
|
var encodedScope = tokenUtil.encode(deviceParam);
|
||||||
var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,
|
var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,"default",
|
||||||
"{\"device\": \"" + encodedScope + "\"}");
|
{"device": encodedScope});
|
||||||
var token = "";
|
var token = "";
|
||||||
if (tokenPair) {
|
if (tokenPair) {
|
||||||
token = tokenPair.accessToken;
|
token = tokenPair.accessToken;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user