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
Release history Release notifications | RSS feed
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.56.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for afex_sso-0.0.56-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fbf5a1c79a66f8155b7b8f2f81a366b38f9ca6865e665a0fabc1005587346a9 |
|
MD5 | ab512a4a46860f2b070a6a93e5d4954c |
|
BLAKE2b-256 | 1220602faa8cbf047fdc7e54789ddd2b6e1205b98539225cb0fdb08390878d41 |