Skip to main content

No project description provided

Project description

Identity Client Library Python

How to install

  • use pip:
    pip install tekoid
    

How to use

  • First, import ClientSDK into your sourcecode. I.E:
from tekoid import ClientSDK
  • Second, you need to instantiate ClientSDK. See example:
clientSDK = ClientSDK(client_id=os.getenv("CLIENT_ID"),
                      client_secret=os.getenv("CLIENT_SECRET"),
                      redirect_uri="http://localhost:5000/callback")

Note: redirect_uri must be declare in iam admin system

addition field type default
scope array [openid,profile]
base_uri string https://oauth.tekoapis.com
authorize_path string /oauth/authorize
token_path string /oauth/token
refresh_token_path string /oauth/token
revoke_token_path string /oauth/revoke
jwks_path string /.well-known/jwks.json
userinfo_path string /userinfo
verify_ssl boolean True
  • Support function:

    • get_authorization_url():

      • return url, state, nonce, code_verifier
    • get_token(self, url, state, nonce=None, code_verifier=None):

      • use for authorization code flow, pass url get from authorization server and state get above
      • code_verifier is not require, use only for public client
      • nonce is not require, use only when client require openid scope
      • return token data
    • get_token():

      • use for client credentials flow
      • return token data
    • get_user_info(token):

      • pass id_token get from get_token()
      • return user data through decode id_token
    • refresh_token(refresh_token):

      • pass refresh token get from get_token()
      • return new token data
    • get_full_user_info(access_token):

      • pass access token get from get_token()
      • return user data through call api
  • you can see the sample code at https://git.teko.vn/user-profile/iam/tekoid-py/-/blob/master/example/app.py

Support

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

tekoid-3.0.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

tekoid-3.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file tekoid-3.0.2.tar.gz.

File metadata

  • Download URL: tekoid-3.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for tekoid-3.0.2.tar.gz
Algorithm Hash digest
SHA256 c387139111bbff5e6e00e4c063615146259adf674b061577433f8b7e4871cee3
MD5 8512ce3e4061afd9f33b9acd5183bc93
BLAKE2b-256 e88501b166d7d9ed5ca00c5b9141b0df30790b7c58fcb31aaaafb33690b60e14

See more details on using hashes here.

File details

Details for the file tekoid-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: tekoid-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for tekoid-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c8a66020fa6bdf0fb73c2dcc60dc6ee88788d1688477b90da14e8a9bdb637cbb
MD5 e6898d557c793eb380f3d5e0fdcdb162
BLAKE2b-256 9bb4b8852038ed442d843d58cb8a61c43cecf3f939121ec2f7924648246bfa6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page