Python
PythonidentraVerify access tokens (EdDSA via cached JWKS) and call the management API.
Install
pip install identraVerify a token
python
from identra import IdentraServer, IdentraError
identra = IdentraServer(
base_url="http://localhost:8080",
application_id=APP_ID,
api_key=API_KEY, # optional; only for API calls
)
# In your auth dependency / middleware:
try:
claims = identra.verify_token(authorization_header)
# claims.sub, claims.sid, claims.aal, claims.org, claims.org_role
except IdentraError:
... # respond 401Management calls
python
user = identra.create_user(primary_email="a@b.com")API
IdentraSerververify_token()create_user()IdentraError