There is an issue with authentification using Issuer & Validator scheme since version 2.0.0
Issue description:
oauth/token endpoint is expecting Content-Type: application/jsonhere, but auth service is expecting Content-Type: application/x-www-form-urlencodedhere
To reproduce:
Not passing Context-Type header => returns 415 error code
#!/usr/bin/python3
import json
import requests
import sys
s = requests.Session()
s.headers.update({'X-Optimizely-SDK-Key': "mySDKkey"})
We are using a custom build image with a workaround of removing `contentTypeMiddleware` from [here](https://github.com/optimizely/agent/blob/master/pkg/routers/api.go#L155)
Could this be looked into please? :)
There is an issue with authentification using Issuer & Validator scheme since version 2.0.0
Issue description:
oauth/token
endpoint is expectingContent-Type: application/json
here, butauth
service is expectingContent-Type: application/x-www-form-urlencoded
hereTo reproduce:
Context-Type
header => returns415
error codeimport json import requests import sys
s = requests.Session() s.headers.update({'X-Optimizely-SDK-Key': "mySDKkey"})
resp = s.post('http://localhost:8080/oauth/token', data={ "grant_type": "client_credentials", "client_id": "myclientID", "client_secret": "myclientSecret", })
print(resp)
!/usr/bin/python3
import json import requests import sys
s = requests.Session() s.headers.update({'X-Optimizely-SDK-Key': "mySDKkey"}) s.headers.update({'Content-Type': 'application/json'})
resp = s.post('http://localhost:8080/oauth/token', data={ "grant_type": "client_credentials", "client_id": "myclientID", "client_secret": "myclientSecret", })
print(resp)