6b49aed88a
* initial commit * created httpreq struct * checked against env key * wrapped up comparing xapikey to flag input * added readme * added example and updated code with viper * added ConstantTimeCompare function * fixed spacing * updated with comments, and updated readme * updated main.go with setting env variable * fixed linter errors |
||
---|---|---|
.. | ||
process_api_key.go | ||
README.md |
Purpose of this is to process an API Key to see if it matches the correct client.
Import the following libraries with:
go get -u github.com/spf13/viper
go get -u github.com/spf13/pflag
To use, run in examples/auth/main.go:
$ go run main.go --key=yourkey
Default api key is preset with the mocked headers. This will be changed later.
Where this is going: We're going to be using macaroons to validate a token and permissions. This is a small step to building in that direction.