Metadata-Version: 2.4
Name: kernia-oauth-provider
Version: 0.1.0
Summary: OAuth2/OIDC provider (issuer side) plugin
Project-URL: Homepage, https://kernia.dev
Project-URL: Documentation, https://kernia.dev/docs
Project-URL: Source, https://github.com/advantch/kernia
Project-URL: Issues, https://github.com/advantch/kernia/issues
Project-URL: Changelog, https://github.com/advantch/kernia/releases
Author: Advantch
License-Expression: MIT
License-File: LICENSE
Keywords: asgi,authentication,authorization,django,fastapi,oauth,passkeys,security,sessions,sso,starlette
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Session
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: authlib>=1.3
Requires-Dist: kernia>=0.1.0
Description-Content-Type: text/markdown

# kernia-oauth-provider

OAuth 2.0 and OpenID Connect provider (issuer side) plugin for Kernia. Registers clients, authorizes users, and exchanges authorization codes for access, refresh, and id tokens.

Part of [Kernia](https://kernia.dev), a framework-agnostic authentication library for Python.

## Installation

    pip install kernia-oauth-provider

## Usage

```python
from kernia.auth import init
from kernia.plugins import email_and_password
from kernia.types.init_options import KerniaOptions
from kernia_memory_adapter import memory_adapter
from kernia_oauth_provider import OAuthProviderOptions, oauth_provider

auth = init(
    KerniaOptions(
        database=memory_adapter(),
        secret="dev-secret",
        plugins=[
            email_and_password(),
            oauth_provider(OAuthProviderOptions(issuer="https://auth.example.com")),
        ],
    )
)
```

Access tokens default to self-contained EdDSA JWTs; set `jwt_access_token=False` for opaque reference tokens.

## Documentation

Full documentation at [kernia.dev/docs](https://kernia.dev/docs). Source at [github.com/advantch/kernia](https://github.com/advantch/kernia).

## License

MIT
