Fixed scopes related issue in SAML Granttype

revert-70aa11f8
Milan Perera 8 years ago
parent 8edde9a0f1
commit 562631cc1d

@ -90,9 +90,15 @@ var handlers = function () {
"missing - setupTokenPairByPasswordGrantType(x, y)"); "missing - setupTokenPairByPasswordGrantType(x, y)");
} else { } else {
var tokenData; var tokenData;
var arrayOfScopes = devicemgtProps["scopes"];
var stringOfScopes = "";
arrayOfScopes.forEach(function (entry) {
stringOfScopes += entry + " ";
});
// accessTokenPair will include current access token as well as current refresh token // accessTokenPair will include current access token as well as current refresh token
tokenData = tokenUtil. tokenData = tokenUtil.
getTokenPairAndScopesBySAMLGrantType(samlToken, encodedClientAppCredentials, "PRODUCTION"); getTokenPairAndScopesBySAMLGrantType(samlToken, encodedClientAppCredentials, stringOfScopes);
if (!tokenData) { if (!tokenData) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up token " + throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up token " +
"pair by password grant type. Error in token " + "pair by password grant type. Error in token " +

Loading…
Cancel
Save