MARX#61238: Mareon AX365 Factuurkoppeling: ophalen token via configureerbare URL
svn path=/Mareon/trunk/; revision=45725
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
|
||||
function A365_GetToken ()
|
||||
{
|
||||
// URL
|
||||
var v_url = "https://login.microsoftonline.com/sgautomatiseringbv.onmicrosoft.com/oauth2/token";
|
||||
|
||||
l_request_body = "client_id=" + G_MS_client_id
|
||||
+ "&client_secret=" + G_MS_client_secret
|
||||
@@ -17,7 +15,7 @@ function A365_GetToken ()
|
||||
var v_type = 1;
|
||||
var v_contenttype = "application/x-www-form-urlencoded";
|
||||
__Log("A365_GetToken: Nieuwe token opgehaald" ,2);
|
||||
var v_resp = apiMS(v_url, l_request_body, v_type, v_contenttype, 0);
|
||||
var v_resp = apiMS(G_MS_url, l_request_body, v_type, v_contenttype, 0);
|
||||
var json_resp = JSON.parse(v_resp);
|
||||
|
||||
var v_token = json_resp.access_token;
|
||||
|
||||
@@ -482,6 +482,7 @@ var G_ax_succeededfolder = Read_Ini_Setting("xtractor", "succeededfolder");
|
||||
var G_ax_rejectedfolder = Read_Ini_Setting("xtractor", "rejectedfolder");
|
||||
|
||||
// Microsoft Token instellingen
|
||||
var G_MS_url = Read_Ini_Setting("microsoft","token/url");
|
||||
var G_MS_client_id = Read_Ini_Setting("microsoft","token/client_id");
|
||||
var G_MS_client_secret = Read_Ini_Setting("microsoft","token/client_secret");
|
||||
var G_MS_grant_type = Read_Ini_Setting("microsoft","token/grant_type");
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
</ax365>
|
||||
<microsoft>
|
||||
<token>
|
||||
<url></url>
|
||||
<client_id></client_id>
|
||||
<client_secret></client_secret>
|
||||
<grant_type></grant_type>
|
||||
|
||||
Reference in New Issue
Block a user