我目前正在开发一个REST-API,它为开发环境提供HTTP-Basic保护.由于真正的身份验证是通过令牌完成的,我仍然试图找出,如何发送两个授权头.
我试过这个:
curl -i http://dev.myapp.com/api/users \
-H "Authorization: Basic Ym9zY236Ym9zY28=" \
-H "Authorization: Bearer mytoken123"
Run Code Online (Sandbox Code Playgroud)
我可以为我的IP禁用HTTP身份验证,但由于我通常在具有动态IP的不同环境中工作,这不是一个好的解决方案.我错过了什么吗?
rest curl restful-authentication basic-authentication access-token