mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
updated saml grant type config name
This commit is contained in:
parent
8b5dd4d811
commit
3021947f30
@ -41,4 +41,4 @@ function onRequest(context) {
|
|||||||
response.addCookie(websocketToken);
|
response.addCookie(websocketToken);
|
||||||
}
|
}
|
||||||
return {"device": device, "websocketEndpoint": websocketEndpoint};
|
return {"device": device, "websocketEndpoint": websocketEndpoint};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,9 +12,10 @@
|
|||||||
"owner": "admin@carbon.super",
|
"owner": "admin@carbon.super",
|
||||||
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
||||||
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
||||||
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-carbon",
|
"grantType": "password refresh_token urn:ietf:carbon:signed:grant-type:saml2-bearer",
|
||||||
"tokenScope": "admin",
|
"tokenScope": "admin",
|
||||||
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
"callbackUrl": "%https.ip%/api/device-mgt/v1.0",
|
||||||
|
"samlGrantTypeName": "urn:ietf:carbon:signed:grant-type:saml2-bearer"
|
||||||
},
|
},
|
||||||
"tokenServiceURL": "%https.ip%/oauth2/token"
|
"tokenServiceURL": "%https.ip%/oauth2/token"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -214,8 +214,8 @@ var utils = function () {
|
|||||||
|
|
||||||
// calling oauth provider token service endpoint
|
// calling oauth provider token service endpoint
|
||||||
var requestURL = deviceMgtProps["oauthProvider"]["tokenServiceURL"];
|
var requestURL = deviceMgtProps["oauthProvider"]["tokenServiceURL"];
|
||||||
var requestPayload = "grant_type=urn:ietf:params:oauth:grant-type:saml2-carbon&" +
|
var requestPayload = "grant_type=" + + deviceMgtProps["oauthProvider"]["appRegistration"]["samlGrantTypeName"]
|
||||||
"assertion=" + encodeURIComponent(encodedAssertion) + "&scope=" + scopes;
|
+ "&" + "assertion=" + encodeURIComponent(encodedAssertion) + "&scope=" + scopes;
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", requestURL, false);
|
xhr.open("POST", requestURL, false);
|
||||||
|
|||||||
@ -11,9 +11,10 @@
|
|||||||
"owner": "admin@carbon.super",
|
"owner": "admin@carbon.super",
|
||||||
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
||||||
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
||||||
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-carbon",
|
"grantType": "password refresh_token urn:ietf:carbon:signed:grant-type:saml2-bearer",
|
||||||
"tokenScope": "admin",
|
"tokenScope": "admin",
|
||||||
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
"callbackUrl": "%https.ip%/api/device-mgt/v1.0",
|
||||||
|
"samlGrantTypeName": "urn:ietf:carbon:signed:grant-type:saml2-bearer"
|
||||||
},
|
},
|
||||||
"tokenServiceURL": "%https.ip%/oauth2/token"
|
"tokenServiceURL": "%https.ip%/oauth2/token"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -214,8 +214,8 @@ var utils = function () {
|
|||||||
|
|
||||||
// calling oauth provider token service endpoint
|
// calling oauth provider token service endpoint
|
||||||
var requestURL = deviceMgtProps["oauthProvider"]["tokenServiceURL"];
|
var requestURL = deviceMgtProps["oauthProvider"]["tokenServiceURL"];
|
||||||
var requestPayload = "grant_type=urn:ietf:params:oauth:grant-type:saml2-carbon&" +
|
var requestPayload = "grant_type=" + deviceMgtProps["oauthProvider"]["appRegistration"]["samlGrantTypeName"]
|
||||||
"assertion=" + encodeURIComponent(encodedAssertion) + "&scope=" + scopes;
|
+ "&" + "assertion=" + encodeURIComponent(encodedAssertion) + "&scope=" + scopes;
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", requestURL, false);
|
xhr.open("POST", requestURL, false);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user