For integrating sso
Project description
AFEX SSO (DJANGO)
simple integration (usage)
instantiate the SSO class
from AFEX_SSO import SSO
validate = SSO(sp_api_key, sp_hash_key, session_key)
def get_user_details(View):
get_user = validate()['data'].get('user')
'''
# 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.41.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for afex_sso-0.0.41-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de1f63d1e46212bbb278034fb871d086d22b7e1dce0a7ed8719b12d2870dde13 |
|
MD5 | d3ed45c9bbbdf1ffa29fa23af8ea2636 |
|
BLAKE2b-256 | ffd739d9c35e458a5782a276c24620ec47a09a4adbf61c86d9997741f45028b2 |