Skip to main content

For integrating sso

Project description

AFEX SSO (DJANGO)

Simple Integration (usage)

instantiate the SSO class

  from AFEX_SSO import SSO
  sso = SSO()

  def get_user_details(View):
    sso_instance = sso.check_credentials(session_key)
    get_user = sso_instance['data'].get('user')
    '''
        # other codes
    '''

   def logout(View):
       # get user email
        email = " "
        signout = sso.sign_out(email)
    '''
        # other codes
    '''

Keys

  • session_key : sent from the service provider client (frontend) after successful authentication on the sso

SETTINGS

  • set the sso details on settings.py as shown below
    • SSO_URL = ""
    • SSO_API_KEY = ""
    • SSO_SECRET_KEY = ""

Sample Response

{
"responseCode": "100",
"data": {
    "session_identifier": "SES_2c73ff51cfe5c5a68fc58934c9be3b",
    "user": {
        "email": "example@africaexchange.com",
        "first_name": "Ayodeji",
        "last_name": "Balogun",
        "photo": null,
        "tribe": null,
        "designation": "Software Developer",
        "email_aliases": [
            "example@afexnigeria.com",
        ]
    }
},

"message": "Successfully Retrieved"

}

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

afex-sso-0.0.62.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

afex_sso-0.0.62-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file afex-sso-0.0.62.tar.gz.

File metadata

  • Download URL: afex-sso-0.0.62.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.9

File hashes

Hashes for afex-sso-0.0.62.tar.gz
Algorithm Hash digest
SHA256 19384a23fcdb84a135f6df1a1d75103e9a495f5ba11807aea609f21a8a45b940
MD5 2eb8758808d6371aadae76ded419e0c0
BLAKE2b-256 c869db31e725f0446206c0a2e43c51a08a874346017928e188297b07b9fb4a50

See more details on using hashes here.

File details

Details for the file afex_sso-0.0.62-py3-none-any.whl.

File metadata

  • Download URL: afex_sso-0.0.62-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.9

File hashes

Hashes for afex_sso-0.0.62-py3-none-any.whl
Algorithm Hash digest
SHA256 ffd0cfc26a7d214cfc2e8026415156a130c59c55b2d8c1bdb4e3e272db5001f2
MD5 2d9fdfa195399618b98ef6a12c223b21
BLAKE2b-256 0244a554d5e6685f18d5ef1a8e9a72fb3ecceccdcee4983e0c4e5353661c5e74

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