You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Василий Тащилин 8e0857fb44 revert 6 months ago
fastapi_sso_client fix empty state 7 months ago
tests add client tests 7 months ago
.gitignore initial commit 7 months ago
Pipfile revert 6 months ago
Pipfile.lock revert 6 months ago fix 7 months ago revert 6 months ago



$ pipenv install -e git+


from fastapi import FastAPI, Depends

from fastapi_sso_client.auth import setup_auth
from import DumbJWTStorage
from fastapi_sso_client.deps import SSOAuthHeader

app = FastAPI(
    title="PROJECT_NAME", openapi_url=f"/api/v1/openapi.json"
jwt_depends = Depends(SSOAuthHeader(name="JWT"))

@app.get("/test", dependencies=[jwt_depends])
def test():
    return {"status": "ok"}

def token(token: str = jwt_depends):
    return {"token": token}

setup_auth(app, "SSO_HOST", "SSO_ACCESS_TOKEN", "SSO_ACCESS_KEY", "SSO_ISSUER", DumbJWTStorage())