Closed csKyou closed 6 years ago
personium.getAppAuthUserToken = function(query, token) { var cellUrl = query.cellUrl; var url = [ cellUrl, "__token" ].join(""); var headers = { "Accept": "application/json", "content-type": "application/x-www-form-urlencoded" }; var contentType = "application/json"; var body = [ "grant_type=authorization_code", "code=" + query.code, "client_id=" + personium.getAppCellUrl(), "client_secret=" + token ].join('&'); var httpCodeExpected = 200; return personium.httpPOSTMethod(url, headers, contentType, body, httpCodeExpected); };