Okta JWT Access Token verifier, fork and update
Project description
Okta Jwt
Fork Okta JWT Access Token verifier for Python using cached JWKs.
Link to PyPi - click here
Installation
pip install okta_jwt
Usage
To generate a token, you need to pass in issuer
, client_id
, client_secret
, username
and password
as parameters
>>> from okta_jwt.jwt import generate_token
>>> generate_token(issuer, client_id, client_secret, username, password)
This generates and returns Okta Access Token.
To Validate the Access Token, you need to pass in the access_token
, issuer
, audience
and client_ids
as parameters. You can pass in multiple Client IDs
>>> from okta_jwt.jwt import validate_token
>>> validate_token(access_token, issuer, audience, client_ids)
If the token is valid then it will return the payload.
Running the tests
To run the unit tests, run
$ python -m unittest
Break down into tests
The unit tests pretty much covers all the main functionality of the package, like generating the token, Validating the token and Verifying Claims.
Contributing
Bug reports and Pull Requests(PR's) are welcome on GitHub at https://github.com/adithyasampatoor/okta_jwt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Authors
- Adithya Sampatoor
License
The Library is available as open source under the terms of the MIT License
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
File details
Details for the file enhance_okta_jwt-1.3.5.2.tar.gz
.
File metadata
- Download URL: enhance_okta_jwt-1.3.5.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0386e226fb1e785cb192a8f63b1f18e60329fcd87e7d6111f3ecf40f8b4ea5f8 |
|
MD5 | 2ec03ee985649aeceebc7852dac8046c |
|
BLAKE2b-256 | 3c74e00563c4aac4aa04eefb5d49ad491ffe8a0b4c110446ac28765d2d0a3f26 |