Forked from nilsdebruin/fastapi_api_key_secure_endpoint.py
Created
June 2, 2019 12:36
-
-
Save francbartoli/5bb91acaa6c256369eb8e9a9b849dd95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @app.get("/secure_endpoint", tags=["test"]) | |
| async def get_open_api_endpoint(api_key: APIKey = Depends(get_api_key)): | |
| response = "How cool is this?" | |
| return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment