belgie-core 0.3.0__tar.gz → 0.4.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 (20) hide show
  1. {belgie_core-0.3.0 → belgie_core-0.4.0}/PKG-INFO +1 -1
  2. {belgie_core-0.3.0 → belgie_core-0.4.0}/pyproject.toml +1 -1
  3. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/belgie.py +2 -1
  4. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/settings.py +21 -3
  5. {belgie_core-0.3.0 → belgie_core-0.4.0}/README.md +0 -0
  6. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/__init__.py +0 -0
  7. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/__init__.py +0 -0
  8. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/client.py +0 -0
  9. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/exceptions.py +0 -0
  10. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/hooks.py +0 -0
  11. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/core/protocols.py +0 -0
  12. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/providers/__init__.py +0 -0
  13. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/providers/google.py +0 -0
  14. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/providers/protocols.py +0 -0
  15. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/py.typed +0 -0
  16. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/session/__init__.py +0 -0
  17. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/session/manager.py +0 -0
  18. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/utils/__init__.py +0 -0
  19. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/utils/crypto.py +0 -0
  20. {belgie_core-0.3.0 → belgie_core-0.4.0}/src/belgie_core/utils/scopes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: belgie-core
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Core authentication logic for Belgie
5
5
  Author: Matt LeMay
6
6
  Author-email: Matt LeMay <mplemay@users.noreply.github.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "belgie-core"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "Core authentication logic for Belgie"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -93,7 +93,7 @@ class Belgie[
93
93
  adapter: Database adapter for persistence operations
94
94
  session_manager: Session manager instance for session operations
95
95
  providers: Dictionary of registered OAuth providers keyed by provider_id
96
- router: FastAPI router with authentication endpoints (cached property)
96
+ router: FastAPI router with authentication endpoints
97
97
 
98
98
  Example:
99
99
  >>> from belgie_core import Belgie, BelgieSettings
@@ -191,6 +191,7 @@ class Belgie[
191
191
 
192
192
  return instance
193
193
 
194
+ @property
194
195
  def router(self) -> APIRouter:
195
196
  """FastAPI router with all provider routes.
196
197
 
@@ -17,6 +17,11 @@ class ProviderSettings(BaseSettings):
17
17
  Subclasses must implement __call__ to construct their provider instance.
18
18
  """
19
19
 
20
+ model_config = SettingsConfigDict(
21
+ env_file=".env",
22
+ extra="ignore",
23
+ )
24
+
20
25
  client_id: str
21
26
  client_secret: SecretStr
22
27
  redirect_uri: str
@@ -52,14 +57,22 @@ class ProviderSettings(BaseSettings):
52
57
 
53
58
 
54
59
  class SessionSettings(BaseSettings):
55
- model_config = SettingsConfigDict(env_prefix="BELGIE_SESSION_")
60
+ model_config = SettingsConfigDict(
61
+ env_prefix="BELGIE_SESSION_",
62
+ env_file=".env",
63
+ extra="ignore",
64
+ )
56
65
 
57
66
  max_age: int = Field(default=604800)
58
67
  update_age: int = Field(default=86400)
59
68
 
60
69
 
61
70
  class CookieSettings(BaseSettings):
62
- model_config = SettingsConfigDict(env_prefix="BELGIE_COOKIE_")
71
+ model_config = SettingsConfigDict(
72
+ env_prefix="BELGIE_COOKIE_",
73
+ env_file=".env",
74
+ extra="ignore",
75
+ )
63
76
 
64
77
  name: str = Field(default="belgie_session")
65
78
  secure: bool = Field(default=True)
@@ -69,7 +82,11 @@ class CookieSettings(BaseSettings):
69
82
 
70
83
 
71
84
  class URLSettings(BaseSettings):
72
- model_config = SettingsConfigDict(env_prefix="BELGIE_URLS_")
85
+ model_config = SettingsConfigDict(
86
+ env_prefix="BELGIE_URLS_",
87
+ env_file=".env",
88
+ extra="ignore",
89
+ )
73
90
 
74
91
  signin_redirect: str = Field(default="/dashboard")
75
92
  signout_redirect: str = Field(default="/")
@@ -81,6 +98,7 @@ class BelgieSettings(BaseSettings):
81
98
  env_file=".env",
82
99
  env_file_encoding="utf-8",
83
100
  case_sensitive=False,
101
+ extra="ignore",
84
102
  )
85
103
 
86
104
  secret: str
File without changes