Skip to main content

Module for use ksu sso service

Project description

# Установка pip install ksu-sso-auth

# Настройка В settings проекта добавить: - ‘sso_auth’ в INSTALLED_APPS После этого выполнить команды ` python3 manage.py makemigrations sso_auth python3 manage.py migrate `

Добавить в urls.py проекта в переменную urlpatterns выше всего остального следующий код: ` path('admin/login/', AdminLogin.as_view()), path('admin/logout/', UserLogout.as_view()), path('sso/', include('sso_auth.urls')), ` До этого сделать импорт: ` from django.urls import path, include from sso_auth.views import AdminLogin, UserLogout `

В settings проекта добавить: - ‘sso_auth.middleware.OauthMiddleware’ в MIDDLEWARE - код ниже. нужно заполнить реальными данными от сервера авторизации ` # settings for sso login AUTH_USER_MODEL = 'sso_auth.OauthUser' AUTHENTICATION_BACKENDS = ('sso_auth.backends.TokenAuth',) SSO_URL = 'http://127.0.0.1:8000/oauth/' CLIENT_ID = '1bc2aea0-4dad-4f4a-9f3d-4e205b0fc10a' CLIENT_SECRET = 'Zo8DtoPgu6m533ySFDfBImo0Lao_sh50dxE-EAHJCkwCrNvaPztIsOQaxdB0nKrX11o' REDIRECT_URI = 'http://127.0.0.1:8001/sso/process' `

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

ksu_sso_auth-0.1.4.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

ksu_sso_auth-0.1.4-py2-none-any.whl (12.8 kB view details)

Uploaded Python 2

File details

Details for the file ksu_sso_auth-0.1.4.tar.gz.

File metadata

  • Download URL: ksu_sso_auth-0.1.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.3

File hashes

Hashes for ksu_sso_auth-0.1.4.tar.gz
Algorithm Hash digest
SHA256 64513c052c40f73590c60927a63b9699fc83b0501c01b2490cc7ebbc67d59223
MD5 0951dadc33e68f107d235a75b268117d
BLAKE2b-256 2f281779bcdb3e90efca106868d1f78d31d28947a3da4699d45c3c1edc939fa3

See more details on using hashes here.

File details

Details for the file ksu_sso_auth-0.1.4-py2-none-any.whl.

File metadata

  • Download URL: ksu_sso_auth-0.1.4-py2-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.3

File hashes

Hashes for ksu_sso_auth-0.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 b4a872aacdf95906d388018aa6b219d95e31b44dd740f967b96abcfbd349d7ac
MD5 a3e9a8f00182eaffde6c16667a5f44e0
BLAKE2b-256 3a9c63443fd89c958fd5ce7477a392ec744edd36d900451fe0dca26d038218fc

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