Skip to content

Commit 4d79165

Browse files
authored
Merge pull request #54 from python-ellar/ellar_081_upgrade
upgraded to ellar 0.8.1
2 parents 4a7d55b + 3ce4184 commit 4d79165

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ellar_jwt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""JWT Module for Ellar"""
22

3-
__version__ = "0.2.2"
3+
__version__ = "0.2.4"
44
from .module import JWTModule
55
from .schemas import JWTConfiguration
66
from .services import JWTService

ellar_jwt/module.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from ellar.common import IModuleSetup, Module
66
from ellar.core import Config, ModuleSetup
7-
from ellar.core.modules import DynamicModule, ModuleBase
7+
from ellar.core.modules import DynamicModule, ModuleBase, ModuleRefBase
88
from ellar.di import ProviderConfig
99
from pydantic import AnyHttpUrl
1010

1111
from .schemas import JWTConfiguration
1212
from .services import JWTService
1313

1414

15-
@Module()
15+
@Module(exports=[JWTService, JWTConfiguration])
1616
class JWTModule(ModuleBase, IModuleSetup):
1717
@classmethod
1818
def setup(
@@ -43,7 +43,7 @@ def setup(
4343
return DynamicModule(
4444
cls,
4545
providers=[
46-
JWTService,
46+
ProviderConfig(JWTService),
4747
ProviderConfig(JWTConfiguration, use_value=configuration),
4848
],
4949
)
@@ -54,14 +54,14 @@ def register_setup(cls) -> ModuleSetup:
5454

5555
@staticmethod
5656
def register_setup_factory(
57-
module: t.Type["JWTModule"], config: Config
57+
module_ref: ModuleRefBase, config: Config
5858
) -> DynamicModule:
5959
if config.get("JWT_CONFIG") and isinstance(config.JWT_CONFIG, dict):
6060
schema = JWTConfiguration(**dict(config.JWT_CONFIG))
6161
return DynamicModule(
62-
module,
62+
module_ref.module,
6363
providers=[
64-
JWTService,
64+
ProviderConfig(JWTService),
6565
ProviderConfig(JWTConfiguration, use_value=schema),
6666
],
6767
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ classifiers = [
4040
]
4141

4242
dependencies = [
43-
"ellar >= 0.5.8",
43+
"ellar >= 0.8.2",
4444
"pyjwt>=1.7.1,<3",
4545
"pyjwt[crypto]"
4646
]

0 commit comments

Comments
 (0)