From 54888b6727481451245157d96f67c049b5c38fda Mon Sep 17 00:00:00 2001 From: sinthuja Date: Tue, 21 Mar 2017 19:44:02 +0530 Subject: [PATCH] Adding back the webscoket credential method invocation, as it's needed by the pugins. --- .../app/modules/oauth/token-handlers.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js index f8506f5d68c..0fa1fbb0dc9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js @@ -129,7 +129,7 @@ var handlers = function () { "as input - setupTokenPairBySamlGrantType(x, y)"); } else { privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); - //privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); + privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); if (!encodedClientAppCredentials) { throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " + @@ -158,13 +158,13 @@ var handlers = function () { // setting up access token pair into session context as a string session.put(constants["TOKEN_PAIR"], stringify(tokenPair)); - var scopes = tokenData.scopes.split(" "); - // adding allowed scopes to the session - session.put(constants["ALLOWED_SCOPES"], scopes); - } - } - } - }; + var scopes = tokenData.scopes.split(" "); + // adding allowed scopes to the session + session.put(constants["ALLOWED_SCOPES"], scopes); + } + } + } + }; publicMethods["refreshTokenPair"] = function () { var currentTokenPair = parse(session.get(constants["TOKEN_PAIR"]));