telkkar / NwsApi

C# library for the API from the National Weather Service. Extreme work in progress.
0 stars 0 forks source link

Require consumers of the API to specify an identifier for their application #1

Closed telkkar closed 6 years ago

telkkar commented 6 years ago

Is your feature request related to a problem? Please describe. See the Authentication section under the API Reference tab for the NWS API Documentation.

The future plans are to specify an API key in the user agent string. The API currently allows any user agent string, with the caveat that a security event may be associated with the string. The unwritten implication is that future API requests with that user agent string may be denied.

Describe the solution you'd like This library should allow consumers to specify a custom string to be included in the user agent string when making a request to the NWS API.

Information to consider in the header

  1. Information string about the library being used (this library)
  2. Consumer-specified string to be included with the request header (e.g. contact information)
  3. Extensible into the future when the NWS decides to implement API keys

Describe alternatives you've considered No alternatives at this time.

telkkar commented 6 years ago

See commit 49d816 for the basics of how this is implemented.

When written, these were taken into account

  1. Add user-agent string about current library
  2. Add requirement for consumers to add their own information

Since there's not documented path for API key requirements for the NWS API, we can consider this done for now.