Metadata-Version: 2.5
Name: keg-auth
Version: 0.20261118.1
Summary: Authentication plugin for Keg
Project-URL: Homepage, https://github.com/level12/keg-auth
Project-URL: Repository, https://github.com/level12/keg-auth
Project-URL: Documentation, https://keg-auth.readthedocs.io/
Author-email: Level 12 Developers <devteam@level12.io>
License-Expression: BSD-3-Clause
License-File: license.txt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: bcrypt
Requires-Dist: flask-login>0.4.1
Requires-Dist: inflect
Requires-Dist: joserfc>=1.6.8
Requires-Dist: keg>=0.11.0
Requires-Dist: kegelements>=0.9.0
Requires-Dist: markdown-it-py
Requires-Dist: shortuuid
Requires-Dist: webgrid>=0.4.13
Provides-Extra: i18n
Requires-Dist: morphi>=0.3.2; extra == 'i18n'
Requires-Dist: setuptools; extra == 'i18n'
Requires-Dist: webgrid[i18n]; extra == 'i18n'
Provides-Extra: jwt
Requires-Dist: flask-jwt-extended>=4.0.0; extra == 'jwt'
Provides-Extra: ldap
Requires-Dist: python-ldap; extra == 'ldap'
Provides-Extra: mail
Requires-Dist: flask-mail; extra == 'mail'
Provides-Extra: oauth
Requires-Dist: authlib; extra == 'oauth'
Requires-Dist: requests; extra == 'oauth'
Provides-Extra: tests
Requires-Dist: authlib; extra == 'tests'
Requires-Dist: email-validator; extra == 'tests'
Requires-Dist: flask-bootstrap; extra == 'tests'
Requires-Dist: flask-jwt-extended>=4.0.0; extra == 'tests'
Requires-Dist: flask-mail; extra == 'tests'
Requires-Dist: flask-webtest; extra == 'tests'
Requires-Dist: freezegun; extra == 'tests'
Requires-Dist: psycopg; extra == 'tests'
Requires-Dist: psycopg-binary; extra == 'tests'
Requires-Dist: pyquery; extra == 'tests'
Requires-Dist: pytest; extra == 'tests'
Requires-Dist: pytest-cov; extra == 'tests'
Requires-Dist: python-ldap; extra == 'tests'
Requires-Dist: requests; extra == 'tests'
Requires-Dist: validators; extra == 'tests'
Requires-Dist: xlsxwriter; extra == 'tests'
Description-Content-Type: text/markdown

# Keg-Auth

[![nox](https://github.com/level12/keg-auth/actions/workflows/nox.yaml/badge.svg)](https://github.com/level12/keg-auth/actions/workflows/nox.yaml)
[![codecov](https://codecov.io/github/level12/keg-auth/coverage.svg?branch=master)](https://codecov.io/github/level12/keg-auth?branch=master)

Flask extension in the Keg ecosystem to wrap authentication and authorization
functionality. Keg-Auth provides helpers for auth model, view/authorization setup,
protected navigation menus, and more.


## Installation

- Bare functionality: `pip install keg-auth`
- With mail (i.e. with a mail manager configured): `pip install keg-auth[mail]`
- JWT (for using JWT tokens as authenticators): `pip install keg-auth[jwt]`
- LDAP (for using LDAP target for authentication): `pip install keg-auth[ldap]`
- OAuth (e.g. Google Auth): `pip install keg-auth[oauth]`
- Internationalization extensions: `pip install keg-auth[i18n]`


## A Simple Example

For a simple example and a checklist of sorts for app setup, see the
[Getting Started guide](https://keg-auth.readthedocs.io/en/stable/getting-started.html)
in the docs.


## Demo

Typical usage is demonstrated in
[keg-app-cookiecutter](https://github.com/level12/keg-app-cookiecutter).


## Links

- Documentation: <https://keg-auth.readthedocs.io/en/stable/index.html>
- Releases: <https://pypi.org/project/Keg-Auth/>
- Code: <https://github.com/level12/keg-auth>
- Issue tracker: <https://github.com/level12/keg-auth/issues>
- Keg framework: <https://github.com/level12/keg>
- Questions & comments: <http://groups.google.com/group/blazelibs>


## Dev


### Copier Template

Project structure and tooling mostly derives from
[Coppy](https://github.com/level12/coppy). See its documentation for context and
additional instructions.

This project can be updated from the upstream repo, see
[Updating a Project](https://github.com/level12/coppy?tab=readme-ov-file#template-updates).


### Project Setup

From zero to hero (passing tests that is):

1. Ensure [host dependencies](https://github.com/level12/coppy/wiki/Mise) are installed

2. Start docker service dependencies (if applicable):

   `docker compose up -d`

3. Sync [project](https://docs.astral.sh/uv/concepts/projects/) virtualenv w/ lock file:

   `uv sync`

4. Configure prek:

   `prek install`

5. Run tests:

   `nox`

Copy `keg_auth_ta-config-example.py` to `keg_auth_ta-config.py` and update as needed.
Override database addr &/or port with environment vars or docker compose override if
needed.

The test application can be run with `python -m keg_auth_ta.app`.


### Versions

A `version` task shows and bumps versions:

```shell

  # Show current version
  mise run version show

  # Bump version, tag, and push:
  mise run version bump

  # See other options
  mise run version -- --help
```
