Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include information about client name and version when calling server API. #42

Open
bagabont opened this issue May 4, 2022 · 2 comments
Milestone

Comments

@bagabont
Copy link

bagabont commented May 4, 2022

As a service provider it is important to identify clients which consume an API and their version. Reason being, sometimes there are bad requests, buggy versions, deprecate old versions, etc.

A suggestion is to use X-Client-Name and X-Client-Version.

Similar to: https://stackoverflow.com/questions/17491730/identifying-the-version-of-a-client-web-app-during-http-requests

@GeorgDangl
Copy link
Member

From the discussion in the OpenCDE Documents API Project:

  • The original idea was to use the User-Agent header
  • Since the User-Agent header can't be changed for browser based clients, the new proposal is to add custom headers

However, we're not sure if there's a use case where a browser-based client would use older versions instead of the latest one, and authenticated clients can always be identified via their OAuth2 token that is present in authenticated requests.

@bagabont, could you join the next BCF call to discuss this in more detail?

@bagabont
Copy link
Author

bagabont commented May 10, 2022

Hi Georg, we will try to join. Do you know if it would be possible to acquire the client version from the OAuth2 token?

@ykulbak ykulbak added this to the 2.x milestone May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants