MobilityData / gbfs-validator

The canonical GBFS validator. Maintained by the GBFS community, facilitated by MobilityData.
https://gbfs-validator.mobilitydata.org/
Apache License 2.0
18 stars 12 forks source link

Add `API Key` authentification method #117

Closed richfab closed 1 year ago

richfab commented 1 year ago

Some private feeds require an API Key to be fetched. It would be useful to add the API Key authentification method to validate such feeds.

Before After
image image
testower commented 1 year ago

What exactly does «API Key» mean in this context?

richfab commented 1 year ago

What exactly does «API Key» mean in this context?

I was thinking API Key in the context of a unique identifier used to authenticate the client to the server. The API Key is passed in the request header, such as X-API-KEY: key. Thoughts?

testower commented 1 year ago

I think the header name should be configurable, since “x-api-key” is non-standard, and it may vary what people use in the field.

richfab commented 1 year ago

I think the header name should be configurable, since “x-api-key” is non-standard, and it may vary what people use in the field.

Good point. I made the header name configurable. Thank you!