Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.3 #4

Merged
merged 3 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![PyPI - Downloads](https://img.shields.io/pypi/dm/asgi-claim-validator.svg)](https://pypi.org/project/asgi-claim-validator/)
[![PyPI - License](https://img.shields.io/pypi/l/asgi-claim-validator)](https://www.gnu.org/licenses/gpl-3.0)
[![PyPI - Version](https://img.shields.io/pypi/v/asgi-claim-validator.svg)](https://pypi.org/project/asgi-claim-validator/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asgi-claim-validator)](https://pypi.org/project/asgi-claim-validator/)
Expand Down Expand Up @@ -97,8 +98,8 @@ app = AsyncApp(__name__, specification_dir="spec")
# Add the ClaimValidatorMiddleware
app.add_middleware(
ClaimValidatorMiddleware,
claims_callable=lambda scope: scope["extensions"]["connexion_context"]["token_info"],
secured={
claims_callable = lambda scope: scope["extensions"]["connexion_context"]["token_info"],
secured = {
"^/secured/?$": {
"GET": {
"sub": {
Expand All @@ -114,7 +115,7 @@ app.add_middleware(
},
},
},
skipped={
skipped = {
"^/skipped/?$": ["GET"],
},
)
Expand All @@ -136,7 +137,7 @@ The `secured` configuration is a dictionary that defines the paths and the claim

Example:
```python
secured={
secured = {
"^/secured/?$": {
"GET": {
"sub": {
Expand All @@ -160,7 +161,7 @@ The `skipped` configuration is a dictionary that defines the paths and methods t

Example:
```python
skipped={
skipped = {
"^/skipped/?$": ["GET"],
}
```
Expand Down
68 changes: 36 additions & 32 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "asgi-claim-validator"
version = "1.0.2"
version = "1.0.3"
description = "A focused ASGI middleware for validating additional claims within JWT tokens to enhance token-based workflows."
authors = ["Fabio Greco <[email protected]>"]
maintainers = ["Fabio Greco <[email protected]>"]
Expand Down Expand Up @@ -47,9 +47,9 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.11,<4.0"
joserfc = ">=1.0.2"
joserfc = ">=1.0.1"
jsonschema = ">=4.23.0"
starlette = ">=0.45.3"
starlette = ">=0.45.2"

[tool.poetry.group.dev.dependencies]
connexion = {version="*", extras=["swagger-ui"]}
Expand Down