Skip to main content

Middleware to intercept JWT auth token and more utils functions

Project description

JSM User JWT Service

Middleware to intercept JWT auth token and more utils functions

Install

pip install jsm_user_service

Add jsm_user_service to your INSTALLED_APPS:

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "jsm_user_services",
    "app_test",
]

Add the Middleware:

MIDDLEWARE = [
    ...
    "jsm_user_services.middleware.JsmJwtService",
]

Use

from jsm_user_services.services.user import current_jwt_token
from jsm_user_services.services.user import get_jsm_token
from jsm_user_services.services.user import get_jsm_user_data_from_jwt
from jsm_user_services.services.user import get_ltm_token
from jsm_user_services.services.user import get_ltm_user_data_from_jwt
from jsm_user_services.services.user import get_user_email_from_jwt

current_jwt_token()
get_jsm_token()
get_ltm_token()
get_jsm_user_data_from_jwt()
get_ltm_user_data_from_jwt()
get_user_email_from_jwt()

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

jsm_user_services-0.0.1.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

jsm_user_services-0.0.1-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

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