UpstreamDataInc / goosebit

A simplistic, opinionated remote update server implementing hawkBit™'s DDI API.
https://goosebit.rtfd.io
Apache License 2.0
12 stars 2 forks source link

Add proper API token usage #79

Closed b-rowan closed 3 weeks ago

b-rowan commented 3 weeks ago

Adds API tokens in authorization header, and allows setting secret_key to allows the tokens to persist across application restarts.

Closes #70 Closes #73

easybe commented 3 weeks ago

How does one set a token for a user and pass it in an HTTP header? I would expect to find this information in the commit message body. You should really consider reading https://cbea.ms/git-commit/ :pray:

easybe commented 3 weeks ago

OK, got it. One gets the token by POSTing to /login. That works for me.

Still, would appreciate better commit messages.

b-rowan commented 3 weeks ago

OK, got it. One gets the token by POSTing to /login. That works for me.

Still, would appreciate better commit messages.

Also, along with the token query, you can also now set the secret in the settings file. This means that once you query the token it is static for any given user.