Merge pull request #658 from sinthuja/master

Adding back the websocket credential method invocation.
merge-requests/7/head
Ayyoob Hamza 8 years ago committed by GitHub
commit 57496f9047

@ -129,7 +129,7 @@ var handlers = function () {
"as input - setupTokenPairBySamlGrantType(x, y)"); "as input - setupTokenPairBySamlGrantType(x, y)");
} else { } else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
//privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) { if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " + 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 // setting up access token pair into session context as a string
session.put(constants["TOKEN_PAIR"], stringify(tokenPair)); session.put(constants["TOKEN_PAIR"], stringify(tokenPair));
var scopes = tokenData.scopes.split(" "); var scopes = tokenData.scopes.split(" ");
// adding allowed scopes to the session // adding allowed scopes to the session
session.put(constants["ALLOWED_SCOPES"], scopes); session.put(constants["ALLOWED_SCOPES"], scopes);
} }
} }
} }
}; };
publicMethods["refreshTokenPair"] = function () { publicMethods["refreshTokenPair"] = function () {
var currentTokenPair = parse(session.get(constants["TOKEN_PAIR"])); var currentTokenPair = parse(session.get(constants["TOKEN_PAIR"]));

Loading…
Cancel
Save