Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mgorsk1/fastapi_oauth2
A minimal example of adding oauth2 proxy authentication to your FastAPI microservice.
https://github.com/mgorsk1/fastapi_oauth2
Last synced: 18 days ago
JSON representation
A minimal example of adding oauth2 proxy authentication to your FastAPI microservice.
- Host: GitHub
- URL: https://github.com/mgorsk1/fastapi_oauth2
- Owner: mgorsk1
- License: apache-2.0
- Created: 2022-09-02T09:47:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T10:46:04.000Z (over 2 years ago)
- Last Synced: 2024-10-16T04:22:36.487Z (2 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast API with Oauth2 Proxy
This is a minimal example of adding OAuth2 Proxy Authentication (Keycloak provider) to your FastAPI microservice.
This approach 'hides' original FastAPI backend behind OAuth2 proxy, which handles communication with Keycloak and passes
access token to your API after successful login.## Prerequisites
Add to your `/etc/hosts`:
```text
127.0.0.1 keycloak
127.0.0.1 oidc
```