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
Close
Hashes for fastapi_google_iap-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b919fdd3f5bd29606db2b8f0ca8efabb59f5796319cce9799512d0583d140d65 |
|
MD5 | 9b5c5391be06003bd383187b28826e0c |
|
BLAKE2b-256 | 97e0149c7394d9b1a4d69e9cfa6a8b042dd7e5d356097430035a3ac46f498827 |