/python-hydra-sdk

Hydra SDK for Python

Primary LanguagePythonOtherNOASSERTION

Python Hydra SDK Build Status Coverage Status

This package provides a Python SDK for Hydra OAuth2 and OpenID Connect server made in Go.

Installing

pip install hydra-sdk

Basic usage

Documentation is still in progress...

from hydra import Hydra

# First, create a Hydra client
hydra = Hydra(host='http://localhost:4444', client='client_id', secret='client_secret')

# Get an access token
token = hydra.get_access_token(scope=['hydra'])

# Get a client
client = hydra.clients.get('admin')

Covered API

Hydra API coverage is a work in progress. You can check what is already developed in the following list:

  • OAuth2
    • Get access token (with token cache)
    • Introspect token
    • Revoke token
  • Consent
    • Decode consent challenge
    • Encode consent response
  • Clients
    • Create new client
    • Retrieve client information
    • List all clients
    • Update client
    • Delete client
  • JWK
    • Get JWK set
    • Generate JWK set
    • Upload JWK set
    • Delete JWK set
    • Get JWK key
    • Set JWK key
    • Delete JWK key
  • Policies
    • Create new policy
    • Retrieve policy details
    • Find policy by subject
    • Delete policy
  • Warden
    • Token access control
    • Subject access control

License

Python Hydra SDK is released under MIT license.