-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proper API token usage #79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you very much!
"name": "Apache 2.0", | ||
"identifier": "Apache-2.0", | ||
}, | ||
swagger_ui_parameters={"operationsSorter": "alpha"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we have Swagger UI (/docs) and ReDoc (/redoc). I think ReDoc looks quite nice but, doesn't seem to show the schemas. Anyway, I think we should decide on one and disable the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My preference is swagger, mainly because of the schemas as mentioned. I will try to put forward another PR soon that will customize the swagger UI a bit further, including the favicon, and I can remove redoc there.
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/ 🙏 |
OK, got it. One gets the token by POSTing to 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. |
Adds API tokens in
authorization
header, and allows settingsecret_key
to allows the tokens to persist across application restarts.Closes #70
Closes #73