Skip to main content

No project description provided

Project description

authentikate

codecov PyPI version Maintainer PyPI pyversions PyPI status PyPI download month

DEVELOPMENT

This project is currently under development, and tightly integrates with the arkitekt project. While we are working on a more generic solution, the project API SHOULD be considered unstable. Please use at your own risk, and consider other solutions.

Idea

Authentikate is a library that provides a simple interface to validate tokens and retrieve corresponding user information inside a django application.

Usage

In order to initialize a herre client you need to specify a specific grant to retrieve the access_token. A grant constitutes a way of retrieving a Token in an asynchronous manner.

Installation

pip install authentikate

Configuration

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "guardian",
    "authentikate",
]


AUTH_USER_MODEL = "authentikate.User"

AUTHENTIKATE = {
    "KEY_TYPE": "RS256",
    "PUBLIC_KEY_PEM_FILE": "public_key.pem",
    "FORCE_CLIENT": False,

}

Authentication is done by using the authenticate_token method. This method takes a token and returns a user object if the token is valid. Otherwise it returns None.

```python
from authentikate import authenticate_token, authenticate_headers

def my_view(request):
    auth = authenticate_headers(request.HEADERS)
    if user is not None:
        # do something with user
    else:
        # do something else

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

authentikate-0.1.11.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

authentikate-0.1.11-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file authentikate-0.1.11.tar.gz.

File metadata

  • Download URL: authentikate-0.1.11.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/6.2.0-39-generic

File hashes

Hashes for authentikate-0.1.11.tar.gz
Algorithm Hash digest
SHA256 8cbec68f2ed3acd9f5cb120976c1fdae1f7197a04a12ad0c0dbdcf560edbc058
MD5 8c2eeca91c794bb06f4a63b214a3c54f
BLAKE2b-256 7d0ea9217c3d0d2919f21c56341e6f760ac52681910ea78bb540ae11dd2d086d

See more details on using hashes here.

File details

Details for the file authentikate-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: authentikate-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/6.2.0-39-generic

File hashes

Hashes for authentikate-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0dbd2150618fecba0aab4d928cd4835aed6cccf376f8ecb303b3114c3c245b
MD5 0977589744f7723af83525be48d8f271
BLAKE2b-256 20cf61e988c5d0591fe4d7f3cc9ceb333922795fec04b3d3febe16a431278e90

See more details on using hashes here.

Supported by

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