fauth 0.2.1__tar.gz → 0.3.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.
Files changed (63) hide show
  1. fauth-0.3.0/.github/actions/setup-python-env/action.yml +34 -0
  2. fauth-0.3.0/.github/workflows/cicd.yml +136 -0
  3. {fauth-0.2.1 → fauth-0.3.0}/.github/workflows/pre-commit-autoupdate.yml +8 -16
  4. {fauth-0.2.1 → fauth-0.3.0}/.pre-commit-config.yaml +2 -2
  5. {fauth-0.2.1 → fauth-0.3.0}/CHANGELOG.md +129 -0
  6. {fauth-0.2.1 → fauth-0.3.0}/PKG-INFO +161 -39
  7. {fauth-0.2.1 → fauth-0.3.0}/README.md +160 -38
  8. {fauth-0.2.1 → fauth-0.3.0}/fauth/__init__.py +2 -0
  9. fauth-0.3.0/fauth/middleware/__init__.py +3 -0
  10. fauth-0.3.0/fauth/middleware/auth.py +88 -0
  11. {fauth-0.2.1 → fauth-0.3.0}/fauth/providers/provider.py +9 -1
  12. {fauth-0.2.1 → fauth-0.3.0}/pyproject.toml +1 -1
  13. fauth-0.3.0/tests/middleware/conftest.py +157 -0
  14. fauth-0.3.0/tests/middleware/test_auth_middleware.py +105 -0
  15. fauth-0.3.0/tests/testing/__init__.py +0 -0
  16. {fauth-0.2.1 → fauth-0.3.0}/uv.lock +55 -55
  17. fauth-0.2.1/.github/workflows/cicd.yml +0 -181
  18. fauth-0.2.1/requirements.txt +0 -54
  19. {fauth-0.2.1 → fauth-0.3.0}/.github/dependabot.yml +0 -0
  20. {fauth-0.2.1 → fauth-0.3.0}/.gitignore +0 -0
  21. {fauth-0.2.1 → fauth-0.3.0}/LICENSE +0 -0
  22. {fauth-0.2.1 → fauth-0.3.0}/fauth/api/__init__.py +0 -0
  23. {fauth-0.2.1 → fauth-0.3.0}/fauth/api/router.py +0 -0
  24. {fauth-0.2.1 → fauth-0.3.0}/fauth/core/__init__.py +0 -0
  25. {fauth-0.2.1 → fauth-0.3.0}/fauth/core/config.py +0 -0
  26. {fauth-0.2.1 → fauth-0.3.0}/fauth/core/exceptions.py +0 -0
  27. {fauth-0.2.1 → fauth-0.3.0}/fauth/core/schemas.py +0 -0
  28. {fauth-0.2.1 → fauth-0.3.0}/fauth/crypto/__init__.py +0 -0
  29. {fauth-0.2.1 → fauth-0.3.0}/fauth/crypto/jwt.py +0 -0
  30. {fauth-0.2.1 → fauth-0.3.0}/fauth/crypto/password.py +0 -0
  31. {fauth-0.2.1 → fauth-0.3.0}/fauth/providers/__init__.py +0 -0
  32. {fauth-0.2.1 → fauth-0.3.0}/fauth/providers/protocols.py +0 -0
  33. {fauth-0.2.1 → fauth-0.3.0}/fauth/testing/__init__.py +0 -0
  34. {fauth-0.2.1 → fauth-0.3.0}/fauth/testing/config.py +0 -0
  35. {fauth-0.2.1 → fauth-0.3.0}/fauth/testing/fakes.py +0 -0
  36. {fauth-0.2.1 → fauth-0.3.0}/fauth/testing/provider.py +0 -0
  37. {fauth-0.2.1 → fauth-0.3.0}/fauth/transports/__init__.py +0 -0
  38. {fauth-0.2.1 → fauth-0.3.0}/fauth/transports/base.py +0 -0
  39. {fauth-0.2.1 → fauth-0.3.0}/fauth/transports/bearer.py +0 -0
  40. {fauth-0.2.1 → fauth-0.3.0}/fauth/utils/__init__.py +0 -0
  41. {fauth-0.2.1 → fauth-0.3.0}/fauth/utils/logging.py +0 -0
  42. {fauth-0.2.1 → fauth-0.3.0}/pytest.ini +0 -0
  43. {fauth-0.2.1 → fauth-0.3.0}/tests/__init__.py +0 -0
  44. {fauth-0.2.1 → fauth-0.3.0}/tests/api/__init__.py +0 -0
  45. {fauth-0.2.1 → fauth-0.3.0}/tests/api/conftest.py +0 -0
  46. {fauth-0.2.1 → fauth-0.3.0}/tests/api/test_openapi.py +0 -0
  47. {fauth-0.2.1 → fauth-0.3.0}/tests/api/test_router.py +0 -0
  48. {fauth-0.2.1 → fauth-0.3.0}/tests/conftest.py +0 -0
  49. {fauth-0.2.1 → fauth-0.3.0}/tests/core/__init__.py +0 -0
  50. {fauth-0.2.1 → fauth-0.3.0}/tests/core/conftest.py +0 -0
  51. {fauth-0.2.1 → fauth-0.3.0}/tests/core/test_config.py +0 -0
  52. {fauth-0.2.1 → fauth-0.3.0}/tests/core/test_exceptions.py +0 -0
  53. {fauth-0.2.1 → fauth-0.3.0}/tests/crypto/__init__.py +0 -0
  54. {fauth-0.2.1 → fauth-0.3.0}/tests/crypto/conftest.py +0 -0
  55. {fauth-0.2.1 → fauth-0.3.0}/tests/crypto/test_jwt.py +0 -0
  56. {fauth-0.2.1 → fauth-0.3.0}/tests/crypto/test_password.py +0 -0
  57. {fauth-0.2.1/tests/providers → fauth-0.3.0/tests/middleware}/__init__.py +0 -0
  58. {fauth-0.2.1/tests/testing → fauth-0.3.0/tests/providers}/__init__.py +0 -0
  59. {fauth-0.2.1 → fauth-0.3.0}/tests/providers/conftest.py +0 -0
  60. {fauth-0.2.1 → fauth-0.3.0}/tests/providers/test_provider.py +0 -0
  61. {fauth-0.2.1 → fauth-0.3.0}/tests/testing/test_testing.py +0 -0
  62. {fauth-0.2.1 → fauth-0.3.0}/tests/utils/conftest.py +0 -0
  63. {fauth-0.2.1 → fauth-0.3.0}/tests/utils/test_logging.py +0 -0
@@ -0,0 +1,34 @@
1
+ name: 'Setup Python Environment'
2
+ description: 'Install Python, uv, and project dependencies'
3
+
4
+ inputs:
5
+ python-version:
6
+ description: 'Python version to set up'
7
+ required: true
8
+ uv-version:
9
+ description: 'uv version to install'
10
+ required: false
11
+ default: '0.9.11'
12
+ install-dependencies:
13
+ description: 'Whether to run uv sync after setup'
14
+ required: false
15
+ default: 'true'
16
+
17
+ runs:
18
+ using: 'composite'
19
+ steps:
20
+ - name: Set up Python ${{ inputs.python-version }}
21
+ uses: actions/setup-python@v6
22
+ with:
23
+ python-version: ${{ inputs.python-version }}
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ version: ${{ inputs.uv-version }}
29
+ python-version: ${{ inputs.python-version }}
30
+
31
+ - name: Install dependencies
32
+ if: inputs.install-dependencies == 'true'
33
+ shell: bash
34
+ run: uv sync --all-groups --frozen
@@ -0,0 +1,136 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ permissions:
10
+ id-token: write
11
+ contents: write
12
+ pull-requests: write
13
+ actions: write
14
+
15
+ jobs:
16
+ lint:
17
+ name: Lint (Python ${{ matrix.python-version }})
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ python-version: ["3.12", "3.13", "3.14"]
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ with:
25
+ token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
26
+ fetch-depth: 0
27
+
28
+ - name: Setup environment
29
+ uses: ./.github/actions/setup-python-env
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Run lint and format checks
34
+ run: uv run poe format
35
+
36
+ test:
37
+ name: Test (Python ${{ matrix.python-version }})
38
+ runs-on: ubuntu-latest
39
+ strategy:
40
+ matrix:
41
+ python-version: ["3.12", "3.13", "3.14"]
42
+ steps:
43
+ - uses: actions/checkout@v6
44
+ with:
45
+ token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
46
+ fetch-depth: 0
47
+
48
+ - name: Setup environment
49
+ uses: ./.github/actions/setup-python-env
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+
53
+ - name: Run unit tests
54
+ env:
55
+ SECRET_KEY: ${{ secrets.SECRET_KEY }}
56
+ run: uv run poe test
57
+
58
+ update-hooks:
59
+ name: Update pre-commit hooks
60
+ if: github.event_name == 'pull_request'
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - uses: actions/checkout@v6
64
+ with:
65
+ token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
66
+ ref: ${{ github.head_ref }}
67
+ fetch-depth: 0
68
+
69
+ - name: Setup environment
70
+ uses: ./.github/actions/setup-python-env
71
+ with:
72
+ python-version: "3.13"
73
+
74
+ - name: Autoupdate pre-commit hooks
75
+ run: uv run pre-commit autoupdate
76
+
77
+ - name: Commit updated hooks
78
+ run: |
79
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
80
+ git config --local user.name "github-actions[bot]"
81
+ git add .pre-commit-config.yaml
82
+ git diff --staged --quiet || git commit -m "chore(config): update pre-commit hooks"
83
+ git push origin HEAD:${{ github.head_ref }}
84
+
85
+ versioning:
86
+ name: Versioning
87
+ runs-on: ubuntu-latest
88
+ if: github.ref == 'refs/heads/main'
89
+ needs: [lint, test]
90
+ steps:
91
+ - uses: actions/checkout@v6
92
+ with:
93
+ token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
94
+ ref: main
95
+ fetch-depth: 0
96
+
97
+ - name: Setup environment
98
+ uses: ./.github/actions/setup-python-env
99
+ with:
100
+ python-version: "3.13"
101
+
102
+ - name: Bump version and update changelog
103
+ id: release
104
+ uses: python-semantic-release/python-semantic-release@v9.21.1
105
+ with:
106
+ github_token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
107
+
108
+ outputs:
109
+ released: ${{ steps.release.outputs.released }}
110
+
111
+ publish:
112
+ name: Publish to PyPI
113
+ runs-on: ubuntu-latest
114
+ if: needs.versioning.outputs.released == 'true'
115
+ needs: [versioning]
116
+ environment:
117
+ name: pypi
118
+ url: https://pypi.org/p/fauth
119
+ steps:
120
+ - uses: actions/checkout@v6
121
+ with:
122
+ token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
123
+ ref: main
124
+ fetch-depth: 0
125
+
126
+ - name: Setup environment
127
+ uses: ./.github/actions/setup-python-env
128
+ with:
129
+ python-version: "3.13"
130
+ install-dependencies: "false"
131
+
132
+ - name: Build package
133
+ run: uv build
134
+
135
+ - name: Publish to PyPI
136
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -5,8 +5,8 @@ name: Pre-commit Update
5
5
 
6
6
  on:
7
7
  schedule:
8
- - cron: '0 2 * * *'
9
- workflow_dispatch: # Allows manual triggering of the workflow
8
+ - cron: '0 2 * * 1' # Mondays at 2 AM UTC
9
+ workflow_dispatch:
10
10
 
11
11
  permissions:
12
12
  contents: read
@@ -20,34 +20,26 @@ jobs:
20
20
  runs-on: ubuntu-latest
21
21
  steps:
22
22
  - uses: actions/checkout@v6
23
- - uses: actions/setup-python@v6
24
23
  with:
25
- python-version: '3.13'
24
+ token: ${{ secrets.GH_TOKEN }}
25
+ fetch-depth: 0
26
26
 
27
- - name: Install uv
28
- uses: astral-sh/setup-uv@v7
27
+ - name: Setup environment
28
+ uses: ./.github/actions/setup-python-env
29
29
  with:
30
- version: '0.9.11'
31
30
  python-version: '3.13'
32
31
 
33
- - name: Install dependencies
34
- run: |
35
- uv sync --all-groups --frozen
36
-
37
32
  - name: Autoupdate pre-commit hooks
38
- working-directory: '.'
39
33
  run: uv run pre-commit autoupdate
40
34
 
41
35
  - name: Create Pull Request
42
36
  uses: peter-evans/create-pull-request@v8
43
- env:
44
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
45
37
  with:
46
- token: ${{ env.GH_TOKEN }}
38
+ token: ${{ secrets.GH_TOKEN }}
47
39
  branch: chore/pre-commit-autoupdate
48
40
  title: Update pre-commit hooks
49
41
  commit-message: 'chore(config): update pre-commit hooks'
50
42
  body: |
51
43
  This PR was created automatically by the pre-commit autoupdate workflow.
52
44
  It updates the pre-commit hooks to their latest versions.
53
- labels: update
45
+ labels: update-hooks
@@ -17,7 +17,7 @@ repos:
17
17
  - id: gitleaks
18
18
 
19
19
  - repo: https://github.com/astral-sh/ruff-pre-commit
20
- rev: 'v0.15.8'
20
+ rev: 'v0.15.10'
21
21
  hooks:
22
22
  - id: ruff-check
23
23
  name: ruff
@@ -44,7 +44,7 @@ repos:
44
44
  - fastapi==0.135.1
45
45
 
46
46
  - repo: https://github.com/pre-commit/mirrors-mypy
47
- rev: v1.20.0
47
+ rev: v1.20.1
48
48
  hooks:
49
49
  - id: mypy
50
50
  additional_dependencies:
@@ -1,6 +1,135 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.3.0 (2026-04-15)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Correct typo in pylint disable directive within auth middleware
9
+ ([`bc06572`](https://github.com/justmatias/fauth/commit/bc0657237d634e604eaa6be046fbc68fa86a8396))
10
+
11
+ ### Chores
12
+
13
+ - Disable pylint complexity checks for auth middleware dispatch method
14
+ ([`7c335aa`](https://github.com/justmatias/fauth/commit/7c335aa3165bd5de2234084b6df6a9361f815922))
15
+
16
+ - **config**: Update pre-commit hooks
17
+ ([`34ca640`](https://github.com/justmatias/fauth/commit/34ca64099763b3d5faca1c1a2b56673584c4c321))
18
+
19
+ - **config**: Update pre-commit hooks
20
+ ([`e6225f9`](https://github.com/justmatias/fauth/commit/e6225f946ef5a3f89c6a15cd490656bdb57f3425))
21
+
22
+ - **deps**: Bump cryptography from 46.0.6 to 46.0.7
23
+ ([`c57f70f`](https://github.com/justmatias/fauth/commit/c57f70f21998cb49b83673cc7c47e8c3826dc65c))
24
+
25
+ Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.6 to 46.0.7. -
26
+ [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) -
27
+ [Commits](https://github.com/pyca/cryptography/compare/46.0.6...46.0.7)
28
+
29
+ --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.7
30
+
31
+ dependency-type: indirect ...
32
+
33
+ Signed-off-by: dependabot[bot] <support@github.com>
34
+
35
+ - **deps**: Bump pygments from 2.19.2 to 2.20.0
36
+ ([`c022333`](https://github.com/justmatias/fauth/commit/c022333b5f61003c07242810126fec443bd93a91))
37
+
38
+ Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0. - [Release
39
+ notes](https://github.com/pygments/pygments/releases) -
40
+ [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) -
41
+ [Commits](https://github.com/pygments/pygments/compare/2.19.2...2.20.0)
42
+
43
+ --- updated-dependencies: - dependency-name: pygments dependency-version: 2.20.0
44
+
45
+ dependency-type: indirect ...
46
+
47
+ Signed-off-by: dependabot[bot] <support@github.com>
48
+
49
+ - **deps**: Bump pyjwt from 2.11.0 to 2.12.0
50
+ ([`0c443a9`](https://github.com/justmatias/fauth/commit/0c443a92b921cea23f1ac71ba837fc335fed183f))
51
+
52
+ Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.11.0 to 2.12.0. - [Release
53
+ notes](https://github.com/jpadilla/pyjwt/releases) -
54
+ [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) -
55
+ [Commits](https://github.com/jpadilla/pyjwt/compare/2.11.0...2.12.0)
56
+
57
+ --- updated-dependencies: - dependency-name: pyjwt dependency-version: 2.12.0
58
+
59
+ dependency-type: indirect ...
60
+
61
+ Signed-off-by: dependabot[bot] <support@github.com>
62
+
63
+ - **deps-dev**: Bump pytest from 9.0.2 to 9.0.3
64
+ ([`f1372ad`](https://github.com/justmatias/fauth/commit/f1372addbf826fe305623d713cb492ee51e6ced8))
65
+
66
+ Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.2 to 9.0.3. - [Release
67
+ notes](https://github.com/pytest-dev/pytest/releases) -
68
+ [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) -
69
+ [Commits](https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3)
70
+
71
+ --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.3
72
+
73
+ dependency-type: direct:development ...
74
+
75
+ Signed-off-by: dependabot[bot] <support@github.com>
76
+
77
+ ### Features
78
+
79
+ - Implement AuthMiddleware for JWT-based request authentication and user loading
80
+ ([`0527038`](https://github.com/justmatias/fauth/commit/0527038d3f5e897fc77258820a26c062d3fc075e))
81
+
82
+
83
+ ## v0.2.2 (2026-04-04)
84
+
85
+ ### Bug Fixes
86
+
87
+ - Add badge for dependabot
88
+ ([`22f4719`](https://github.com/justmatias/fauth/commit/22f47195a489fbd9a63f5772c1081b887a2b0ea1))
89
+
90
+ ### Chores
91
+
92
+ - Add python version matrix to CI/CD workflow
93
+ ([`9576512`](https://github.com/justmatias/fauth/commit/9576512733ed709c9bce62a97101d397a010ace8))
94
+
95
+ - Fix cicd for dependabot prs
96
+ ([`befb729`](https://github.com/justmatias/fauth/commit/befb729fca3e37ba23c5158b29659f712455f6ac))
97
+
98
+ - Implement setup env action and remove legacy requirements.txt
99
+ ([`781a552`](https://github.com/justmatias/fauth/commit/781a552e29c3d658247762c5cf13bb66042976fb))
100
+
101
+ - Remove extract curly brace
102
+ ([`2661dd3`](https://github.com/justmatias/fauth/commit/2661dd3f94da79909fa900d6d6dc341e199f5bb4))
103
+
104
+ - Restore checkout step in jobs
105
+ ([`ad4e33d`](https://github.com/justmatias/fauth/commit/ad4e33d1b2575f368b7cb256c1bf9d34b52855dd))
106
+
107
+ - Set python version to min supported
108
+ ([`8c981a4`](https://github.com/justmatias/fauth/commit/8c981a40939df8230ba1f776cf1dc6f57090ebad))
109
+
110
+ - **config**: Update pre-commit hooks
111
+ ([`ab09f61`](https://github.com/justmatias/fauth/commit/ab09f6185058cece84ddf5ef371b268b7fb75429))
112
+
113
+ - **config**: Update pre-commit hooks
114
+ ([`6ec7a6d`](https://github.com/justmatias/fauth/commit/6ec7a6de9c618d1d5bf8b0f157d52888346f49a1))
115
+
116
+ - **config**: Update requirements.txt
117
+ ([`862978f`](https://github.com/justmatias/fauth/commit/862978f8073c065086b3080dafc45e3b604b98ce))
118
+
119
+ - **deps**: Bump cryptography from 46.0.5 to 46.0.6
120
+ ([`a61129d`](https://github.com/justmatias/fauth/commit/a61129df6777736ecff5df4c1a878a70b378025d))
121
+
122
+ Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.5 to 46.0.6. -
123
+ [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) -
124
+ [Commits](https://github.com/pyca/cryptography/compare/46.0.5...46.0.6)
125
+
126
+ --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.6
127
+
128
+ dependency-type: indirect ...
129
+
130
+ Signed-off-by: dependabot[bot] <support@github.com>
131
+
132
+
4
133
  ## v0.2.1 (2026-04-03)
5
134
 
6
135
  ### Bug Fixes