Skip to content

Commit fdd8a48

Browse files
authored
Merge pull request #3 from feteu/develop
Develop
2 parents b806f96 + 38aad0e commit fdd8a48

File tree

7 files changed

+36
-35
lines changed

7 files changed

+36
-35
lines changed

asgi_claim_validator/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from asgi_claim_validator.exceptions import (
1+
from .exceptions import (
22
ClaimValidatorException,
33
InvalidClaimsConfigurationException,
44
InvalidClaimsTypeException,
@@ -10,8 +10,8 @@
1010
UnspecifiedMethodAuthenticationException,
1111
UnspecifiedPathAuthenticationException,
1212
)
13-
from asgi_claim_validator.middleware import ClaimValidatorMiddleware
14-
from asgi_claim_validator.types import (
13+
from .middleware import ClaimValidatorMiddleware
14+
from .types import (
1515
ClaimsCallableType,
1616
ClaimsType,
1717
SecuredCompiledType,

asgi_claim_validator/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from re import escape
2-
from asgi_claim_validator.types import SecuredType, SkippedType, ClaimsCallableType
2+
from .types import SecuredType, SkippedType, ClaimsCallableType
33

44
_DEFAULT_ANY_HTTP_METHODS: str = "*"
55
_DEFAULT_ALL_HTTP_METHODS: list[str] = [

asgi_claim_validator/decorators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
from jsonschema import validate
33
from jsonschema.exceptions import SchemaError, ValidationError
44
from logging import getLogger
5-
from asgi_claim_validator.constants import (
5+
from .constants import (
66
_DEFAULT_CLAIMS_CALLABLE,
77
_DEFAULT_SECURED_JSON_SCHEMA,
88
_DEFAULT_SKIPPED_JSON_SCHEMA,
99
)
10-
from asgi_claim_validator.exceptions import (
10+
from .exceptions import (
1111
InvalidClaimsConfigurationException,
1212
InvalidSecuredConfigurationException,
1313
InvalidSkippedConfigurationException,

asgi_claim_validator/middleware.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from logging import DEBUG, getLogger
55
from re import compile, error, IGNORECASE, NOFLAG, Pattern, RegexFlag
66
from starlette.types import ASGIApp, Receive, Scope, Send
7-
from asgi_claim_validator.constants import (
7+
from .constants import (
88
_DEFAULT_ANY_HTTP_METHODS,
99
_DEFAULT_CLAIMS_CALLABLE,
1010
_DEFAULT_RAISE_ON_INVALID_CLAIM,
@@ -17,20 +17,20 @@
1717
_DEFAULT_SECURED,
1818
_DEFAULT_SKIPPED,
1919
)
20-
from asgi_claim_validator.decorators import (
20+
from .decorators import (
2121
validate_claims_callable,
2222
validate_secured,
2323
validate_skipped,
2424
)
25-
from asgi_claim_validator.exceptions import (
25+
from .exceptions import (
2626
InvalidClaimsTypeException,
2727
InvalidClaimValueException,
2828
MissingEssentialClaimException,
2929
UnauthenticatedRequestException,
3030
UnspecifiedMethodAuthenticationException,
3131
UnspecifiedPathAuthenticationException,
3232
)
33-
from asgi_claim_validator.types import (
33+
from .types import (
3434
ClaimsCallableType,
3535
SecuredCompiledType,
3636
SecuredType,

poetry.lock

+21-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "asgi-claim-validator"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "A focused ASGI middleware for validating additional claims within JWT tokens to enhance token-based workflows."
55
authors = ["Fabio Greco <[email protected]>"]
66
maintainers = ["Fabio Greco <[email protected]>"]
@@ -47,9 +47,9 @@ packages = [
4747

4848
[tool.poetry.dependencies]
4949
python = ">=3.11,<4.0"
50-
joserfc = "^1.0.1"
51-
jsonschema = "^4.23.0"
52-
starlette = "^0.45.2"
50+
joserfc = ">=1.0.2"
51+
jsonschema = ">=4.23.0"
52+
starlette = ">=0.45.3"
5353

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

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@ def invalid_skipped_configs_03() -> dict:
196196
# invalid method object
197197
return {
198198
"^/skipped$": False,
199-
}
199+
}

0 commit comments

Comments
 (0)