Encode and Decode RS256 JSON Web Tokens with Python and Go
Project description
pygo-jwt
This project focuses on managing JSON Web Tokens signed with RS256. Inspired by pyjwt,
this library provides core encode and decode functionality, utilizing the standard crypto
package within Go instead of
cryptography.
Example Usage for Python
pip install pygo-jwt
import pygo_jwt
private_jwk = pygo_jwt.new_jwk(size=2048)
private_pem = pygo_jwt.jwk_to_pem(private_jwk)
public_jwk = pygo_jwt.extract_public_jwk(private_jwk)
public_pem = pygo_jwt.extract_public_pem(private_pem)
payload = {'message': 'hello world', 'count': 4}
token = pygo_jwt.encode(payload=payload, key=private_pem, mode='pem')
token_data = pygo_jwt.decode(token=token, key=public_jwk, mode='jwk')
Example Usage for Go
go mod init main
go get github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go
package main
import (
"fmt"
lib "github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go/core"
)
func main() {
private_jwk, _ := lib.NewJWK(2048, nil)
private_pem, _ := lib.JWKToPEM(private_jwk)
fmt.Println(private_jwk)
fmt.Println(private_pem)
}
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for pygo_jwt-0.0.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d71830eb5b04cfd5d1be41294d1d2ffd926a9b0eb653ec45f6a19dd7d44781c2 |
|
MD5 | 79fa73f3c50736d4bf7de960f80932f4 |
|
BLAKE2b-256 | 8936179fe18c4ab9c9bfe658f9bd7eecab8ec68abb8f5ffc47a41cc51abc5976 |
Close
Hashes for pygo_jwt-0.0.7-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd3f0f325ca909df4dd965251714a420f95e3310253939b874d582fc4cd761f0 |
|
MD5 | 1dfdfd4fed5ae7c5566804e71b5c5d85 |
|
BLAKE2b-256 | e97ecc4321c929f3a17acc041bc1b712f1e290b5006dcb71c15717ea9d1c76bd |
Close
Hashes for pygo_jwt-0.0.7-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67227599a62c0a90f5b80d027d9af02fe5e5473d45f197c85fbde180710880ba |
|
MD5 | 11bfb7b205f6b14fb55004f940454254 |
|
BLAKE2b-256 | 952287282bcb42dc2b078de8bf4826db89b7cd0481b612829860d394fafe2659 |
Close
Hashes for pygo_jwt-0.0.7-pp310-pypy310_pp73-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4a789304180d29e93e09e751464f7bf25316c76f46150e6bac334e64409bb59 |
|
MD5 | c1dd23b63385463e1e47dabcccce47be |
|
BLAKE2b-256 | f77410a34a208bc45ae6afa870a7f6c8ae8c15085a53c94d9e724390e186af86 |
Close
Hashes for pygo_jwt-0.0.7-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83fa7a3dd87ef432980807369a28741ec29e43ab5df1e8db0f37e6800bbe20f4 |
|
MD5 | 755a6a4abb5bccee2040202fccda22e7 |
|
BLAKE2b-256 | bb5cca0e47b0d5a64f44d22f6fc29e0efbb5d98b608d24fde8ba5710431a4582 |
Close
Hashes for pygo_jwt-0.0.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd2e0cc2df45cebf2f5870a390098a611714c46fb26f88ef09c62860e16d34a0 |
|
MD5 | ef04352e748b355dac417e946afcf139 |
|
BLAKE2b-256 | 8bce8a91b29c4b3dbb607766ca0e0f3928fa7f36ec2fc7a35fdca15c9aab5d4b |
Close
Hashes for pygo_jwt-0.0.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6155efd88119a16a0b0fd87d6fde737936850400af53e4bcb0eb39157f0393ab |
|
MD5 | 76d805683b410c89c0a687adcfe566b4 |
|
BLAKE2b-256 | 849d4f75454283ad8f09a1bcabe4fffa57308a8cf50d0f36d43d2010900021ac |
Close
Hashes for pygo_jwt-0.0.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fffbaa72e296a510d856125f4eb5ef80458187f398b8f80fd9e30538cdb270c7 |
|
MD5 | 8d1c8d4bdb5604db50941dac73c276f3 |
|
BLAKE2b-256 | c544ebd1513d321237597e6b6eefc120bf6918d2e44640138d7f8432759f794f |
Close
Hashes for pygo_jwt-0.0.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1be94a3eb05ce8d633f4324dd1284a8283f951e4cf6fa723677e845d749461ba |
|
MD5 | 24f548322f42673e095566626ec4ae86 |
|
BLAKE2b-256 | f8aed1763f419d30454f3744a25ea931e2f054326c3f4582835a990d205edce2 |
Close
Hashes for pygo_jwt-0.0.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a74a7ff87486392f1b3e5d83b50dd5a724a968f1ec5784e713692dba4ba5c85 |
|
MD5 | a505f21e34bfd6e5a1c1ee3676b09f99 |
|
BLAKE2b-256 | 27eaae46e3dd7d0f22bb3a3805da8b6b07e1fc73bf7f84ef17b18f11640dbaf9 |
Close
Hashes for pygo_jwt-0.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f5bbd9cd154c7bea5136f54b33b038a447b13bdb5037c556db2ad41570811c |
|
MD5 | dae93a30da460681a7146ff7713630f9 |
|
BLAKE2b-256 | 2c224a9009324142103f7eac12d39c65d128ba5d2e8ee9c24834739381126598 |
Close
Hashes for pygo_jwt-0.0.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b5a0dafc73143146145b06fc16d458e488c447106b127171edffe631197398 |
|
MD5 | b6109641c8414905a576abf9e6655a57 |
|
BLAKE2b-256 | 47c07293524fedb103ad0f397706d3466af433916cbdbb4faa3c51389aa7fa99 |
Close
Hashes for pygo_jwt-0.0.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae8847fe833dd7aba6632dc16b9d63a626aa6578724715c1e7107a85310ed9d |
|
MD5 | 1dcaae2b88e17e01d82bb0b5265dce9b |
|
BLAKE2b-256 | a6996ac626acaa1b20d6819a4499964625f18152f269e1802618e932ee6de950 |
Close
Hashes for pygo_jwt-0.0.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912a1f897a8b9429df133c4ac650478643faa3c994db5b99da1b8f7e8bf01a2e |
|
MD5 | c965055548f427b20d9f1de6cc6bb033 |
|
BLAKE2b-256 | 4d557e13dbac7a811ee949e4aa18703074d9eb2285c4989f4e1cf69e0c3941f3 |
Close
Hashes for pygo_jwt-0.0.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d500368fd6bd2a871aecfe9c27a1d3189c4a2baf011aa3ae98ae91ed8154eb94 |
|
MD5 | ae0a75a2e5e58ce8714a4a9829d59321 |
|
BLAKE2b-256 | 6e98b5607fd85cf34339b44412aab63bbc26d5846e5cb53d3b49d7b24e2e1478 |
Close
Hashes for pygo_jwt-0.0.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df837e5aad36dbc584e196702223b0c6c05baa4366e2a46c15129a63c7fc1488 |
|
MD5 | eb18dbc7000c6941a8dd496875e1f2d8 |
|
BLAKE2b-256 | adc462b39871dfbcab3c8482c9ca6e551d77b5e0687553ff60a2c6401e06a7c9 |
Close
Hashes for pygo_jwt-0.0.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bdff96bfabd6015401a960b287bf22bbf1f5d699c8063cdd8fa46b5aed23c5a |
|
MD5 | f748a82554c8fd6ac8db15563632eba5 |
|
BLAKE2b-256 | 97490da033e26e691930a80ced5d4741e115289a5286ae567b09ef986294dcf6 |
Close
Hashes for pygo_jwt-0.0.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871431c9f1dae853d2fe844961805eca1b74449bdd9ddcdbb9b8646870805ebe |
|
MD5 | 4c7d7decaa16454efe2f2178baf12af9 |
|
BLAKE2b-256 | 7c9718e81b913fac66c48a3610388c97828ecd0cc7afd214b6f4b933772e1a53 |
Close
Hashes for pygo_jwt-0.0.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c9b36ec7a7bca903be00e950ad910a7c23b4cafd17f9300536367e3c91164e0 |
|
MD5 | f01efdf37185c407ced91df2cce00871 |
|
BLAKE2b-256 | 6abfb62f9dc56ce49157b090525926f5fdfed6db337afa5fa003908c4e70f0a5 |
Close
Hashes for pygo_jwt-0.0.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dc27d292a537b3f12ad187f70f438e365375e143a3a3d2838d5d4e2f6f4c353 |
|
MD5 | 8af4bf8652ec43ed67668f2e499dce4a |
|
BLAKE2b-256 | 4edd354f0072dcbf8b7900d3c07e4ae1ff9f3f09fd18da580411a0bd11e3fe41 |