Middleware for FastAPI/Starlette to check requests coming through Google Cloud IAP.
Project description
fastapi-google-iap
A FastAPI plugin for Google Cloud Identity-Aware Proxy (IAP) authentication.
Installation
pip install fastapi-google-iap
Usage
from fastapi import FastAPI
from fastapi_google_iap import GoogleIapMiddleware
app = FastAPI()
app.use_middleware(
GoogleIapMiddleware,
audience="/projects/999999999999/apps/example-project",
unprotected_routes=["/healthz"],
restrict_to_domains=["example.com"],
)
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fastapi-google-iap-1.0.1.tar.gz
.
File metadata
- Download URL: fastapi-google-iap-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15df6fc3c667beda11b22e1f89c841d985bccbd34bcfb71ed02d41a845452324 |
|
MD5 | 0eb47a57e02d2a2df8f7eb1c1d138e27 |
|
BLAKE2b-256 | 684064cd8b00b41f0e0644d2c9b81efa5e2582f463887fe2caeb15d94889867f |
File details
Details for the file fastapi_google_iap-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: fastapi_google_iap-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b919fdd3f5bd29606db2b8f0ca8efabb59f5796319cce9799512d0583d140d65 |
|
MD5 | 9b5c5391be06003bd383187b28826e0c |
|
BLAKE2b-256 | 97e0149c7394d9b1a4d69e9cfa6a8b042dd7e5d356097430035a3ac46f498827 |