Catalog PyPI
Back to packageRELEASE DETAILS

0.0.2

PyPI

agios-auth-verify

FastAPI dependency that verifies a user's RBAC permission directly against the auth database

authauthorizationfastapimiddlewarepermissionsrbac
Published8 Sept 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.0.2 documentation

agios-auth-verify

FastAPI dependency that checks an RBAC permission straight off the access-token JWT — decode the token, read the caller's permissions from its claims, allow the request only if the required permission is present. No configuration.

Install

pip install agios-auth-verify

Requires fastapi.

Usage

from fastapi import Depends, FastAPI
from auth_verify import authorize

app = FastAPI()


@app.delete("/users/{user_id}", dependencies=[Depends(authorize("users:delete"))])
async def delete_user(user_id: str):
    return {"ok": True}

The token is read from the access_token cookie or an Authorization: Bearer <token> header. The JWT payload is base64-decoded (signature not verified); its permissions come from the permissions claim (also accepts scope / scopes, space-delimited).

On success the dependency returns {"success": true, "userId": ..., "email": ..., "permissionKey": ...}, so it can also be injected as a value:

@app.delete("/users/{user_id}")
async def delete_user(user_id: str, auth=Depends(authorize("users:delete"))):
    return {"ok": True, "actor": auth["userId"]}

Responses

Raises fastapi.HTTPException with body {"success": false, "message": ...}:

StatusWhen
401No token, or the token payload is unreadable
403The permission is not in the token's claims

Build

python -m build

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
fastapi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
fastapi>=0.100runtime

Distribution files

2 collected
agios_auth_verify-0.0.2-py3-none-any.whl

bdist_wheel · 3.07 KB · Python py3

Source file
agios_auth_verify-0.0.2.tar.gz

sdist · 3.41 KB · Python source

Source file

Repository

NOT_FOUND
agios-ai-rt/auth-verify-python

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:bd089f9a9086a5d96faf3f816cd92aa39dfcfeb6bab1411f176de83e76f9deb3

Other collected versions

View all collected versions →