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(sp_api_key, sp_hash_key, session_key)
get_user = sso_instance['data'].get('user')
'''
# other codes
'''
def logout(View):
# get user email
email = " "
signout = sso.sign_out(sp_api_key, sp_hash_key, session_key, email)
'''
# other codes
'''
Keys
- sp_api_key: service provider api key
- sp_hash_key : hashed key with api key ,secret key and an idempotency key (random values or timestamps)
- session_key : sent from the service provider client after successful authentication on the sso
SETTINGS
-
set the sso url on settings.py as SSO_URL
SSO_URL = ""
Sample Response
{
"responseCode": "100",
"data": {
"session_identifier": "SES_2c73ff51cfe5c5a68fc58934c9be3b",
"user": {
"email": "togunbiyi@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.53.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for afex_sso-0.0.53-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507132a21879956a76d8e9f67ea21aa2ab9a398e13bcc48eb348c5f4f5090798 |
|
MD5 | 8631851bc7cd8d389b5f280e94031f11 |
|
BLAKE2b-256 | c666ea1a5309924a84e5166a2f8bd4295b64da2a3161a21fc16abe15b88bb06d |