An open API service indexing awesome lists of open source software.

https://github.com/shubhamdutta2000/api-key-authentication-with-fastapi

API key-based authentication. This is authentication in the form of an arbitrary string with an arbitrary length, which gives access to an API.
https://github.com/shubhamdutta2000/api-key-authentication-with-fastapi

api-key-authentication authentication fastapi hacktoberfest postgresql

Last synced: 10 days ago
JSON representation

API key-based authentication. This is authentication in the form of an arbitrary string with an arbitrary length, which gives access to an API.

Awesome Lists containing this project

README

          

# API Key Authentication with FastAPI

> This is authentication in the form of an arbitrary string of any length that allows access to an API.

## Feature:

- DB Connection Configuration with PostgresSQL and store all db creds in .env file and load it from seperate EnvConfig file.
- API Key Authentication for:
- Checking for a query parameter containing the API key
- Checking for a header containing the API key
- Checking for a cookie containing the API key
- GET Endpoint to expose all data with proper Pagination (of particular page and limit)
- When no query parameter is specified in the api, the page and limit are set by default which are stored in .env file.


## References:

- https://nilsdebruin.medium.com/fastapi-authentication-revisited-enabling-api-key-authentication-122dc5975680