Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5027

Remote Web service GET request with Authorization Bearer header is not working on 2.3.1

$
0
0

I need to create a remote web service in DSP which makes a GET call to actual web service with Authorization Bearer header.

In short, I need to access a remote web service:
GET https://abc.def.com/userinfo
with header
Authorization: 'Bearer R35.....gP'

And I need a dsp service for the above call as shown below:
GET http://mydspinstance.com:8080/api/v2/auth/userinfo
with header
Authorization: 'Bearer R35.....gP'

With a fresh local bitnami install of 2.3.1 release, I tried GET request BUT the GET request with Authorization header is not working on 2.3.1.

My curl request:
curl -i -k -3 -X GET "http://mydspinstance.com:8080/api/v2/auth/userinfo" -H "X-DreamFactory-Api-Key: 475.....fbd2" -H "Content-Type: application/json" -H "Authorization: Bearer R35.....gP"

This should do:
GET https://abc.def.com/userinfo

BUT the output is:

HTTP/1.1 400 Bad Request
Date: Sun, 23 Oct 2016 05:02:27 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Vary: Cookie
X-Powered-By: PHP/7.0.11
Cache-Control: no-cache
Content-Length: 89
Connection: close
Content-Type: application/json

{"error":{"context":null,"message":"Invalid token: Wrong number of segments","code":401, "trace":[...]}}

Any clues ?

Relevant screenshot:


Viewing all articles
Browse latest Browse all 5027

Trending Articles