mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-09 12:27:46 +00:00
* fixes basic auth example doc; adds apikey example * remove required_scopes references that dont pertain to apikey
21 lines
451 B
ReStructuredText
21 lines
451 B
ReStructuredText
=======================
|
|
API Key Example
|
|
=======================
|
|
|
|
Running:
|
|
|
|
.. code-block:: bash
|
|
|
|
$ sudo pip3 install --upgrade connexion[swagger-ui] # install Connexion from PyPI
|
|
$ ./app.py
|
|
|
|
Now open your browser and go to http://localhost:8080/ui/ to see the Swagger UI.
|
|
|
|
The hardcoded apikey is `asdf1234567890`.
|
|
|
|
Test it out (in another terminal):
|
|
|
|
.. code-block:: bash
|
|
|
|
$ curl -H 'X-Auth: asdf1234567890' http://localhost:8080/secret
|