A FastAPI plugin for Google Cloud Identity-Aware Proxy (IAP) authentication.
pip install fastapi-google-iap
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"],
)
This project is licensed under the terms of the MIT license.