MARX#61238: Mareon AX365 Factuurkoppeling: ophalen token via configureerbare URL

svn path=/Mareon/trunk/; revision=45725
This commit is contained in:
Marcel Bourseau
2020-02-06 10:04:09 +00:00
parent bcf9c081fc
commit eed58cf9f3
3 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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");

View File

@@ -42,6 +42,7 @@
</ax365>
<microsoft>
<token>
<url></url>
<client_id></client_id>
<client_secret></client_secret>
<grant_type></grant_type>