I am currently creating an authentication system in front of a public web API for a web application. Given that each user account has an API key, and each request must be authenticated, I have two alternatives:
Using basic HTTP authentication, like GitHub does .
Requests must be sent to the URL
http://api.example.com/resource/id with basic authentication username: token password: the api key
Passing an API token as a querystring parameter.
Requests must be sent to the URL
http:
There is also a third option that passes the token to the URI, but I honestly don't like this solution.
What decision would you make and why?
authentication api architecture basic-authentication
Simone Carletti Feb 11 2018-11-11T00: 00Z
source share