webtoken 0.4.2__tar.gz → 0.6.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.6.0/.github/workflows/release.yml +157 -0
- webtoken-0.6.0/.github/workflows/tests.yml +84 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/Cargo.lock +231 -224
- {webtoken-0.4.2 → webtoken-0.6.0}/Cargo.toml +14 -8
- {webtoken-0.4.2 → webtoken-0.6.0}/PKG-INFO +21 -36
- {webtoken-0.4.2 → webtoken-0.6.0}/README.md +18 -33
- {webtoken-0.4.2 → webtoken-0.6.0}/benchmarks/benchmarks.py +4 -11
- {webtoken-0.4.2 → webtoken-0.6.0}/pyproject.toml +5 -5
- webtoken-0.6.0/src/algorithms.rs +58 -0
- webtoken-0.6.0/src/crypto.rs +1130 -0
- webtoken-0.6.0/src/crypto_parsing.rs +280 -0
- webtoken-0.6.0/src/jwe.rs +375 -0
- webtoken-0.6.0/src/jwk.rs +266 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/src/jws.rs +7 -12
- webtoken-0.6.0/src/jwt.rs +405 -0
- webtoken-0.6.0/src/key_utils.rs +278 -0
- webtoken-0.6.0/src/lib.rs +1261 -0
- webtoken-0.6.0/src/paseto.rs +1053 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/src/pyjwt_jwk_api.rs +90 -87
- webtoken-0.6.0/tests/keys_and_vectors.py +109 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_advisory.py +1 -1
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_algorithms.py +20 -29
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_api_jwk.py +1 -1
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_api_jws.py +1 -1
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_api_jwt.py +1 -1
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_compressed.py +1 -1
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_exceptions.py +1 -1
- webtoken-0.6.0/tests/test_jwe.py +272 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/test_jwt.py +1 -1
- webtoken-0.6.0/tests/test_paseto.py +375 -0
- webtoken-0.6.0/tests/test_paseto_key.py +197 -0
- webtoken-0.6.0/tests/test_paseto_sample.py +333 -0
- webtoken-0.6.0/tests/test_paseto_token.py +66 -0
- webtoken-0.6.0/tests/test_paseto_v4.py +126 -0
- webtoken-0.6.0/tests/test_paseto_vectors.py +691 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/tests.py +1 -1
- webtoken-0.6.0/webtoken/webtoken.py +1188 -0
- webtoken-0.4.2/.github/workflows/release.yml +0 -140
- webtoken-0.4.2/run_pyjwt_tests_compat.py +0 -171
- webtoken-0.4.2/src/algorithms.rs +0 -297
- webtoken-0.4.2/src/crypto.rs +0 -588
- webtoken-0.4.2/src/jwk.rs +0 -840
- webtoken-0.4.2/src/lib.rs +0 -1272
- webtoken-0.4.2/test_der.py +0 -42
- webtoken-0.4.2/tests/test_jwks_client.py +0 -383
- webtoken-0.4.2/webtoken/webtoken.py +0 -775
- {webtoken-0.4.2 → webtoken-0.6.0}/.gitignore +0 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/License +0 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/benchmarks/Readme.md +0 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/src/py_utils.rs +0 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/tests/Readme.md +0 -0
- {webtoken-0.4.2 → webtoken-0.6.0}/webtoken/__init__.py +0 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build_wheels:
|
|
14
|
+
name: Build wheels (${{ matrix.name }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
include:
|
|
19
|
+
- name: Linux x86
|
|
20
|
+
os: ubuntu-latest
|
|
21
|
+
target: x86_64
|
|
22
|
+
manylinux: auto
|
|
23
|
+
|
|
24
|
+
- name: Musl x86
|
|
25
|
+
os: ubuntu-latest
|
|
26
|
+
target: x86_64
|
|
27
|
+
manylinux: musllinux_1_2
|
|
28
|
+
|
|
29
|
+
- name: Linux ARM64
|
|
30
|
+
os: ubuntu-latest
|
|
31
|
+
target: aarch64
|
|
32
|
+
manylinux: manylinux_2_28
|
|
33
|
+
qemu: true
|
|
34
|
+
|
|
35
|
+
- name: MacOS
|
|
36
|
+
os: macos-latest
|
|
37
|
+
target: x86_64
|
|
38
|
+
|
|
39
|
+
- name: Windows
|
|
40
|
+
os: windows-latest
|
|
41
|
+
target: x64
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v6
|
|
45
|
+
- name: Set up QEMU
|
|
46
|
+
if: matrix.qemu
|
|
47
|
+
uses: docker/setup-qemu-action@v3
|
|
48
|
+
|
|
49
|
+
- name: Build wheels
|
|
50
|
+
uses: PyO3/maturin-action@v1
|
|
51
|
+
with:
|
|
52
|
+
target: ${{ matrix.target }}
|
|
53
|
+
manylinux: ${{ matrix.manylinux }}
|
|
54
|
+
args: --release --out dist --find-interpreter
|
|
55
|
+
sccache: 'true'
|
|
56
|
+
|
|
57
|
+
- name: Upload wheels
|
|
58
|
+
uses: actions/upload-artifact@v6
|
|
59
|
+
with:
|
|
60
|
+
name: wheels-${{ matrix.name }}
|
|
61
|
+
path: dist
|
|
62
|
+
|
|
63
|
+
build_wheels_freebsd:
|
|
64
|
+
name: Build FreeBSD wheels
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v6
|
|
68
|
+
- name: Build in FreeBSD VM
|
|
69
|
+
uses: vmactions/freebsd-vm@v1
|
|
70
|
+
with:
|
|
71
|
+
usesh: true
|
|
72
|
+
prepare: pkg install -y rust python313 git
|
|
73
|
+
|
|
74
|
+
run: |
|
|
75
|
+
python3.13 -m venv venv
|
|
76
|
+
. venv/bin/activate
|
|
77
|
+
pip install maturin
|
|
78
|
+
maturin build --release --out dist --find-interpreter
|
|
79
|
+
|
|
80
|
+
- name: Upload FreeBSD wheels
|
|
81
|
+
uses: actions/upload-artifact@v6
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-freebsd
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
build_sdist:
|
|
88
|
+
name: Build source distribution
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v6
|
|
92
|
+
- name: Build sdist
|
|
93
|
+
uses: PyO3/maturin-action@v1
|
|
94
|
+
with:
|
|
95
|
+
command: sdist
|
|
96
|
+
args: --out dist
|
|
97
|
+
- name: Upload sdist
|
|
98
|
+
uses: actions/upload-artifact@v6
|
|
99
|
+
with:
|
|
100
|
+
name: sdist
|
|
101
|
+
path: dist
|
|
102
|
+
|
|
103
|
+
publish:
|
|
104
|
+
name: Publish to PyPI + GitHub Release
|
|
105
|
+
needs: [build_wheels, build_wheels_freebsd, build_sdist]
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
environment: pypi
|
|
108
|
+
permissions:
|
|
109
|
+
contents: write
|
|
110
|
+
id-token: write
|
|
111
|
+
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v6
|
|
114
|
+
|
|
115
|
+
- uses: actions/download-artifact@v7
|
|
116
|
+
with:
|
|
117
|
+
name: sdist
|
|
118
|
+
path: dist
|
|
119
|
+
|
|
120
|
+
# Explicit downloads - FreeBSD wheels not allowed on PyPI
|
|
121
|
+
- uses: actions/download-artifact@v7
|
|
122
|
+
with:
|
|
123
|
+
name: wheels-Linux x86
|
|
124
|
+
path: dist
|
|
125
|
+
- uses: actions/download-artifact@v7
|
|
126
|
+
with:
|
|
127
|
+
name: wheels-Musl x86
|
|
128
|
+
path: dist
|
|
129
|
+
- uses: actions/download-artifact@v7
|
|
130
|
+
with:
|
|
131
|
+
name: wheels-Linux ARM64
|
|
132
|
+
path: dist
|
|
133
|
+
- uses: actions/download-artifact@v7
|
|
134
|
+
with:
|
|
135
|
+
name: wheels-MacOS
|
|
136
|
+
path: dist
|
|
137
|
+
- uses: actions/download-artifact@v7
|
|
138
|
+
with:
|
|
139
|
+
name: wheels-Windows
|
|
140
|
+
path: dist
|
|
141
|
+
|
|
142
|
+
- name: Publish to PyPI
|
|
143
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
144
|
+
|
|
145
|
+
- uses: actions/download-artifact@v7
|
|
146
|
+
with:
|
|
147
|
+
name: wheels-freebsd
|
|
148
|
+
path: dist
|
|
149
|
+
|
|
150
|
+
# GitHub Release with all wheels
|
|
151
|
+
- name: GitHub Release
|
|
152
|
+
uses: softprops/action-gh-release@v2
|
|
153
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
154
|
+
with:
|
|
155
|
+
files: dist/*
|
|
156
|
+
generate_release_notes: true
|
|
157
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
# Linux, Windows, MacOS
|
|
13
|
+
test-standard:
|
|
14
|
+
name: Test (${{ matrix.os }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
20
|
+
python-version: ['3.12', '3.13', '3.14', '3.14t']
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Set up Rust
|
|
26
|
+
run: rustup update stable && rustup default stable
|
|
27
|
+
|
|
28
|
+
- uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Install build dependencies
|
|
33
|
+
run: pip install maturin pytest
|
|
34
|
+
|
|
35
|
+
- name: Build and install
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
maturin build --release
|
|
39
|
+
pip install target/wheels/*.whl
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: pytest tests
|
|
43
|
+
|
|
44
|
+
# Alpine Linux (Musl)
|
|
45
|
+
test-alpine:
|
|
46
|
+
name: Test (Alpine/Musl)
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
container:
|
|
49
|
+
image: python:3.13-alpine
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v6
|
|
52
|
+
- name: Install Alpine build deps
|
|
53
|
+
run: apk add --no-cache gcc musl-dev libffi-dev rust cargo openssl-dev git patchelf
|
|
54
|
+
- name: Install dependencies
|
|
55
|
+
run: pip install maturin pytest
|
|
56
|
+
|
|
57
|
+
- name: Build and install
|
|
58
|
+
run: |
|
|
59
|
+
maturin build --release
|
|
60
|
+
pip install target/wheels/*.whl
|
|
61
|
+
|
|
62
|
+
- name: Run tests
|
|
63
|
+
run: pytest tests
|
|
64
|
+
|
|
65
|
+
# FreeBSD
|
|
66
|
+
test-freebsd:
|
|
67
|
+
name: Test (FreeBSD)
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v6
|
|
71
|
+
- name: Test in FreeBSD VM
|
|
72
|
+
uses: vmactions/freebsd-vm@v1
|
|
73
|
+
with:
|
|
74
|
+
usesh: true
|
|
75
|
+
prepare: pkg install -y rust python313 git
|
|
76
|
+
run: |
|
|
77
|
+
python3.13 -m venv venv
|
|
78
|
+
. venv/bin/activate
|
|
79
|
+
pip install maturin pytest
|
|
80
|
+
|
|
81
|
+
maturin build --release
|
|
82
|
+
pip install target/wheels/*.whl
|
|
83
|
+
|
|
84
|
+
pytest tests
|