Skip to main content

Authentication plugin for Keg

Project description

Keg Auth’s Readme

https://circleci.com/gh/level12/keg-auth.svg?&style=shield&circle-token=b90c5336d179f28df73d404a26924bc373840257 https://codecov.io/github/level12/keg-auth/coverage.svg?branch=master&token=hl15MQRPeF

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, see below): 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]

  • OIDC (for OAuth, e.g. Okta or Auth0): pip install keg-auth[oidc]

  • 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 in the docs.

Demo

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

Changelog

0.2.26 released 2021-01-29

  • Provide Spinx documentation (62aca54)

  • Provide a default JS handler for confirm-delete in crud-list (7b6785a)

  • Use marksafe and jinja templates instead of webhelpers2 (8f68e07)

  • Allow user to prevent sending welcome email after user form (3bb8f7a)

  • Validate that create_form returned a value (83ff034)

  • Trap integrity error on permission sync to mitigate race condition (4d7497c)

  • Move disabled_utc to be with the other fields (dd1bf5e)

0.2.25 released 2020-12-08

  • CRUD view passes through args set with self.assign (efeb7b7)

  • CRUD view edit/delete performs authorization prior to ID lookup (efeb7b7)

  • CRUD view added webgrid render limit handling (efeb7b7)

0.2.24 released 2020-07-09

  • Fix inconsistent CLI argument ordering in tests (d9a62c0)

0.2.23 released 2020-06-11

  • Allow applications to enforce custom password policies (7111c20)

  • Check translations in CI (825d32e)

0.2.22 released 2020-04-16

  • Allow rate-limiting of login and password resets (d243b75)

  • Add more config flexibility for OIDC (39beae0)

0.2.21 released 2020-04-02

  • Resolve fuzzy/missing translations (a78de96)

  • Add inactivation date for users (requires migration to add a field) (0020fbd)

  • Support latest Flask-Login (ba59925)

  • Allow unverified users to reset their passwords (8888386)

  • Pin keg-elements requirement to support CRUD checkboxes (e59fcc1)

  • Include an Allow header for 405 responses (a2a3091)

  • Support multiple LDAP targets (b895aad)

  • Handle HEAD requests (b16a7e4)

  • Remove six dependency (477a415)

0.2.20 released 2020-03-24

  • OIDC and related updates (fab68f5)

  • Add OIDC authenticator and login/logout view responders

  • Fix missing page header for Permissions view

  • Allow passing blueprint kwargs to make_blueprint

  • Easier disabling of specific auth views

  • Allow view responder flash messages to be disabled

  • Drop bulk permission controls (better templating now in keg-elements)

0.2.19 released 2020-02-21

  • Improve Usability of Permission Dropdown (479e985)

  • Pin Flask Login (00ea957)

0.2.18 released 2020-01-10

  • add CLI command for dev to set password (d488bc9)

0.2.17 released 2019-12-12

  • ensure token is present for resending verification email (01b566f)

0.2.16 released 2019-12-02

  • fix CRUD edit form default values for relationships (01893f9)

0.2.15 released 2019-11-27

  • fix bundle grid setup for CRUD view (b772f01)

0.2.14 released 2019-11-21

  • fix template issue related to select2 updates (373739b)

  • make auth testing helpers more generic (b90ee96)

0.2.13 released 2019-11-08

  • use select2 to render selects on the user management views (30ff332)

  • fix breakage with keg 0.8.1 (3f5668d)

  • adjust CI environments to use (b9b4fb4)

  • auth test helpers use endpoints to find correct url (76a1222)

0.2.12 released 2019-10-03

  • support decorating flask class-based views (3d8a6cb)

  • fix LDAP authenticator for missing user case (19d184e)

0.2.11 released 2019-09-27

  • fix permission sync method and test hook (a56eda4)

  • fix FontAwesome usage on CRUD list view template (64f759a)

  • support lazy strings and icons in navigation helpers and templates (4473571)

  • remove flask version pin (ab47362)

0.2.10 released 2019-09-18

  • fix testing utils mock import to prevent needing mock dependency (da197df)

0.2.9 released 2019-07-27

  • Provide a hook on the CRUD base class to allow overriding the default add url generation (#74) (7eea8bb)

0.2.8 released 2019-06-17

  • resolve bug in testing permission existence check (feccb98)

0.2.7 released 2019-06-07

  • make custom action access control easier (63921ee)

  • enforce test permissions are specified to the auth manager (794f320)

  • correct the MRO order in CRUD forms and testing models (2f4c451)

  • add get_current_user helper method (cae02a2)

  • make grid action column link CSS classes customizable (aa1bc21)

  • ensure CRUD view passes in desired template args (aae3dad)

0.2.6 released 2019-02-12

  • Merge pull request #60 from level12/move-sync-perms-to-entity (3181691)

  • update readme to remove reference to view-scoped authenticators (514c202)

0.2.5 released 2018-11-14

  • Allow make_blueprint to accept a custom blueprint class (fe635b2)

  • Add a link to resend verification email (f7a6191)

  • Add optional i18n support using morphi (790d3ab)

  • Fix intermittent test failure resulting from login timestamp (cde083b)

  • Refactor CRUD form/grid render to extract template args (34d4a20)

0.2.4

  • Show verification URL on CLI even if mail flag is off

0.2.3

  • Fix requires_user decorator for usage with blueprints

0.2.1

  • Fix nav items to cache on per user basis

  • Fix token generated in CLI having an unknown timezone applied

0.2.0

  • Support permissions

  • Decorate blueprints, classes, methods for user/permission requirements

  • Support request loaders for tokens

0.1.0

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Keg Auth-0.2.26.tar.gz (103.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Keg_Auth-0.2.26-py2.py3-none-any.whl (109.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Keg Auth-0.2.26.tar.gz.

File metadata

  • Download URL: Keg Auth-0.2.26.tar.gz
  • Upload date:
  • Size: 103.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.9

File hashes

Hashes for Keg Auth-0.2.26.tar.gz
Algorithm Hash digest
SHA256 3f76cf9ea25588e99e88ed356039d7a2b4892a5e4f9179a1b0bb39884079161d
MD5 2e41b378962ac194e64eab0b06170a2d
BLAKE2b-256 acf2809688897dd20095afb5a86779982a80825fa7973a23f3306c9c41d04fef

See more details on using hashes here.

File details

Details for the file Keg_Auth-0.2.26-py2.py3-none-any.whl.

File metadata

  • Download URL: Keg_Auth-0.2.26-py2.py3-none-any.whl
  • Upload date:
  • Size: 109.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.9

File hashes

Hashes for Keg_Auth-0.2.26-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 15b392fa2ee5664a48b7bc9a56fdbfeacd989bfb7711b76b6892f150316180dd
MD5 cf17db49cb9d2fb39abd099da6311488
BLAKE2b-256 b4a415b16f9394450226cbbef2cbd81e51a798d95783d872b44ff32039e3cbaf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page