Skip to content

Commit

Permalink
Add Public security definition to Swagger (#447) (#454)
Browse files Browse the repository at this point in the history
* Add Public security definition to Swagger (#447)

Add Public security definition to Swagger settings as described in #446

* Formatting

* flake8

Co-authored-by: Milan Jaroš <milan.jaros@gmail.com>
  • Loading branch information
dabeeeenster and milanjaros authored Nov 1, 2021
1 parent f894761 commit 43ad220
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/app/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,22 @@
SWAGGER_SETTINGS = {
"SHOW_REQUEST_HEADERS": True,
"SECURITY_DEFINITIONS": {
"api_key": {"type": "apiKey", "in": "header", "name": "Authorization"}
"Private": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Every time you create a new Project Environment, an environment API key is automatically generated for you. This is all you need to pass in to get access to Flags etc. <br />Example value: <br />Token 884b1b4c6b4ddd112e7a0a139f09eb85e8c254ff", # noqa
},
"Public": {
"type": "apiKey",
"in": "header",
"name": "X-Environment-Key",
"description": "Things like creating new flags, environments, toggle flags or indeed anything that is possible from the administrative front end. <br />Example value: <br />FFnVjhp7xvkT5oTLq4q788", # noqa
},
},
}


LOGIN_URL = "/admin/login/"
LOGOUT_URL = "/admin/logout/"

Expand Down

0 comments on commit 43ad220

Please sign in to comment.