Framework-agnostic OAuth 2.1 JWT validation and token operations for Python resource servers.
pip install authplane-sdkimport asyncio
from authplane import ASCredentials, AuthplaneClient
async def main():
client = await AuthplaneClient.create(
issuer="https://auth.example.com",
auth=ASCredentials(client_id="my-resource", client_secret="s3cret"),
)
res = client.resource(
resource="https://api.example.com",
scopes=["read", "write"],
)
claims = await res.verify(incoming_jwt)
print(claims.sub, claims.scopes)
await client.aclose()
asyncio.run(main())Call await client.aclose() on shutdown to stop background JWKS and metadata refresh tasks.
Full API reference, configuration options, error hierarchy, DPoP, token operations, introspection, token exchange, and advanced usage: User Guide.