Update auth.js
This commit is contained in:
parent
438f478541
commit
4ecd7867b0
1 changed files with 2 additions and 2 deletions
|
|
@ -4,10 +4,10 @@ function getSession (req, callback) {
|
||||||
if(typeof req.headers.cookie !== 'undefined'){
|
if(typeof req.headers.cookie !== 'undefined'){
|
||||||
request.post({
|
request.post({
|
||||||
headers: {'content-type' : 'application/x-www-form-urlencoded'},
|
headers: {'content-type' : 'application/x-www-form-urlencoded'},
|
||||||
url: 'http://127.0.0.1:3000/verify:token',
|
url: 'http://service-authentication:3000/verify:token',
|
||||||
body: 'sessionid='+req.headers.cookie.replace('SESSIONID=','')
|
body: 'sessionid='+req.headers.cookie.replace('SESSIONID=','')
|
||||||
},function (error, response, body) {
|
},function (error, response, body) {
|
||||||
console.log("body ; getSession auth private :",body);
|
//console.log("body ; getSession auth private :",body);
|
||||||
if(typeof body !== 'undefined'){
|
if(typeof body !== 'undefined'){
|
||||||
const bodyJson = JSON.parse(body);
|
const bodyJson = JSON.parse(body);
|
||||||
if (bodyJson && bodyJson.status && bodyJson.data) {
|
if (bodyJson && bodyJson.status && bodyJson.data) {
|
||||||
|
|
|
||||||
Reference in a new issue