jamescun / wg-api

WG-API is a JSON-RPC Server for WireGuard
MIT License
151 stars 21 forks source link

Add Token Authentication through HTTP Authorization header #5

Closed jamescun closed 4 years ago

jamescun commented 4 years ago

Adds support for passing in multiple tokens, either by command line argument or environment variables, that are required in the Authorization header before WG-API will execute the request.

Adding the environment variable was a little hacky, seek to refactor this á la issue #4. Middleware construction also may need to be refactored.

Fixes #2