webtoken 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- webtoken-0.1.0/.github/workflows/release.yml +140 -0
- webtoken-0.1.0/.gitignore +10 -0
- webtoken-0.1.0/Cargo.lock +690 -0
- webtoken-0.1.0/Cargo.toml +42 -0
- webtoken-0.1.0/License +5 -0
- webtoken-0.1.0/PKG-INFO +128 -0
- webtoken-0.1.0/README.md +120 -0
- webtoken-0.1.0/benchmarks/Readme.md +50 -0
- webtoken-0.1.0/benchmarks/benchmarks.py +103 -0
- webtoken-0.1.0/pyproject.toml +20 -0
- webtoken-0.1.0/run_pyjwt_tests_compat.py +171 -0
- webtoken-0.1.0/src/algorithms.rs +297 -0
- webtoken-0.1.0/src/crypto.rs +588 -0
- webtoken-0.1.0/src/jwk.rs +840 -0
- webtoken-0.1.0/src/jws.rs +68 -0
- webtoken-0.1.0/src/lib.rs +1272 -0
- webtoken-0.1.0/src/py_utils.rs +79 -0
- webtoken-0.1.0/src/pyjwt_jwk_api.rs +653 -0
- webtoken-0.1.0/test_der.py +42 -0
- webtoken-0.1.0/tests/Readme.md +19 -0
- webtoken-0.1.0/tests/test_advisory.py +121 -0
- webtoken-0.1.0/tests/test_algorithms.py +1749 -0
- webtoken-0.1.0/tests/test_api_jwk.py +294 -0
- webtoken-0.1.0/tests/test_api_jws.py +989 -0
- webtoken-0.1.0/tests/test_api_jwt.py +999 -0
- webtoken-0.1.0/tests/test_compressed.py +39 -0
- webtoken-0.1.0/tests/test_exceptions.py +15 -0
- webtoken-0.1.0/tests/test_jwks_client.py +383 -0
- webtoken-0.1.0/tests/test_jwt.py +26 -0
- webtoken-0.1.0/tests/tests.py +501 -0
- webtoken-0.1.0/webtoken/__init__.py +33 -0
- webtoken-0.1.0/webtoken/webtoken.py +775 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
name: Build and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
## -- Linux + Glibc - Ubuntu, Debian, CentOS, Fedora
|
|
14
|
+
linux:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
target: [x86_64, aarch64]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.13'
|
|
24
|
+
- name: Build manylinux wheels
|
|
25
|
+
uses: PyO3/maturin-action@v1
|
|
26
|
+
with:
|
|
27
|
+
target: ${{ matrix.target }}
|
|
28
|
+
args: --release --out dist --find-interpreter
|
|
29
|
+
sccache: 'true'
|
|
30
|
+
manylinux: auto
|
|
31
|
+
- name: Upload wheels
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: wheels-linux-${{ matrix.target }}
|
|
35
|
+
path: dist
|
|
36
|
+
|
|
37
|
+
## -- Linux + Musl - Alpine
|
|
38
|
+
musllinux:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
target: [x86_64, aarch64]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: '3.13'
|
|
48
|
+
- name: Build musllinux wheels
|
|
49
|
+
uses: PyO3/maturin-action@v1
|
|
50
|
+
with:
|
|
51
|
+
target: ${{ matrix.target }}
|
|
52
|
+
args: --release --out dist --find-interpreter
|
|
53
|
+
sccache: 'true'
|
|
54
|
+
manylinux: musllinux_1_2 # Targeting Alpine
|
|
55
|
+
- name: Upload wheels
|
|
56
|
+
uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: wheels-musl-${{ matrix.target }}
|
|
59
|
+
path: dist
|
|
60
|
+
|
|
61
|
+
## -- Windows
|
|
62
|
+
windows:
|
|
63
|
+
runs-on: windows-latest
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
- uses: actions/setup-python@v5
|
|
67
|
+
with:
|
|
68
|
+
python-version: '3.13'
|
|
69
|
+
architecture: x64
|
|
70
|
+
- uses: actions/setup-go@v4
|
|
71
|
+
with:
|
|
72
|
+
go-version: '1.20'
|
|
73
|
+
- name: Install NASM
|
|
74
|
+
uses: ilammy/setup-nasm@v1
|
|
75
|
+
- name: Build wheels
|
|
76
|
+
uses: PyO3/maturin-action@v1
|
|
77
|
+
with:
|
|
78
|
+
target: x64
|
|
79
|
+
args: --release --out dist --find-interpreter
|
|
80
|
+
sccache: 'true'
|
|
81
|
+
- name: Upload wheels
|
|
82
|
+
uses: actions/upload-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: wheels-windows
|
|
85
|
+
path: dist
|
|
86
|
+
|
|
87
|
+
## -- macOS (Intel + Apple Silicon)
|
|
88
|
+
macos:
|
|
89
|
+
runs-on: macos-latest
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
target: [x86_64, aarch64]
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
- uses: actions/setup-python@v5
|
|
96
|
+
with:
|
|
97
|
+
python-version: '3.13'
|
|
98
|
+
- name: Build wheels
|
|
99
|
+
uses: PyO3/maturin-action@v1
|
|
100
|
+
with:
|
|
101
|
+
target: ${{ matrix.target }}
|
|
102
|
+
args: --release --out dist --find-interpreter
|
|
103
|
+
sccache: 'true'
|
|
104
|
+
- name: Upload wheels
|
|
105
|
+
uses: actions/upload-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: wheels-macos-${{ matrix.target }}
|
|
108
|
+
path: dist
|
|
109
|
+
|
|
110
|
+
## -- Source Distribution - FreeBSD
|
|
111
|
+
sdist:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- name: Build sdist
|
|
116
|
+
uses: PyO3/maturin-action@v1
|
|
117
|
+
with:
|
|
118
|
+
command: sdist
|
|
119
|
+
args: --out dist
|
|
120
|
+
- name: Upload sdist
|
|
121
|
+
uses: actions/upload-artifact@v4
|
|
122
|
+
with:
|
|
123
|
+
name: wheels-sdist
|
|
124
|
+
path: dist
|
|
125
|
+
|
|
126
|
+
## -- PyPI
|
|
127
|
+
release:
|
|
128
|
+
name: Release
|
|
129
|
+
runs-on: ubuntu-latest
|
|
130
|
+
if: "startsWith(github.ref, 'refs/tags/')"
|
|
131
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/download-artifact@v4
|
|
134
|
+
- name: Publish to PyPI
|
|
135
|
+
uses: PyO3/maturin-action@v1
|
|
136
|
+
env:
|
|
137
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
138
|
+
with:
|
|
139
|
+
command: upload
|
|
140
|
+
args: --non-interactive --skip-existing wheels-*/*
|