statezero 0.1.0b64__tar.gz → 0.1.0b65__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.
- {statezero-0.1.0b64 → statezero-0.1.0b65}/PKG-INFO +1 -1
- {statezero-0.1.0b64 → statezero-0.1.0b65}/pyproject.toml +1 -1
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/views.py +20 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero.egg-info/PKG-INFO +1 -1
- {statezero-0.1.0b64 → statezero-0.1.0b65}/README.md +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/requirements.txt +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/setup.cfg +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/action_serializers.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/actions.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/apps.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/config.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/context_manager.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/db_telemetry.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/event_emitters.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/exception_handler.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/custom_field_serializers/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/custom_field_serializers/file_fields.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/custom_field_serializers/money_field.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/custom_field_serializers/pydantic_field.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/simple_history.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/f_handler.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/helpers.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/management/commands/statezero_testserver.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/middleware.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/migrations/0001_initial.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/migrations/0002_delete_modelviewsubscription.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/migrations/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/orm.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/permissions.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/query_optimizer.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/schemas.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/search_providers/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/search_providers/basic_search.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/search_providers/postgres_search.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/serializers.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/signals.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/testing.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/urls.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/utils.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/__init__.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/actions.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/ast_parser.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/ast_validator.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/classes.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/config.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/context_storage.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/event_bus.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/event_emitters.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/exceptions.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/hook_checks.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/interfaces.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/process_request.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/query_cache.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/telemetry.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/core/types.py +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero.egg-info/SOURCES.txt +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero.egg-info/dependency_links.txt +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero.egg-info/requires.txt +0 -0
- {statezero-0.1.0b64 → statezero-0.1.0b65}/statezero.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: statezero
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0b65
|
|
4
4
|
Summary: Connect your Python backend to a modern JavaScript SPA frontend with 90% less complexity.
|
|
5
5
|
Author-email: Robert <robert.herring@statezero.dev>
|
|
6
6
|
Project-URL: homepage, https://www.statezero.dev
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "statezero"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.0b65"
|
|
8
8
|
description = "Connect your Python backend to a modern JavaScript SPA frontend with 90% less complexity."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -44,6 +44,18 @@ class EventsAuthView(APIView):
|
|
|
44
44
|
permission_classes = [permission_class]
|
|
45
45
|
|
|
46
46
|
def post(self, request, *args, **kwargs):
|
|
47
|
+
sync_token = getattr(settings, "STATEZERO_SYNC_TOKEN", None)
|
|
48
|
+
client_token = request.headers.get("X-StateZero-Sync-Token")
|
|
49
|
+
if client_token is not None:
|
|
50
|
+
if not sync_token or client_token != sync_token:
|
|
51
|
+
return Response(
|
|
52
|
+
{
|
|
53
|
+
"error": "Sync token mismatch for events auth.",
|
|
54
|
+
"header": "X-StateZero-Sync-Token",
|
|
55
|
+
},
|
|
56
|
+
status=status.HTTP_409_CONFLICT,
|
|
57
|
+
)
|
|
58
|
+
|
|
47
59
|
channel_name = request.data.get("channel_name")
|
|
48
60
|
socket_id = request.data.get("socket_id")
|
|
49
61
|
|
|
@@ -77,6 +89,14 @@ class EventsAuthView(APIView):
|
|
|
77
89
|
|
|
78
90
|
# Delegate authentication to the event emitter.
|
|
79
91
|
response = event_emitter.authenticate(request)
|
|
92
|
+
if client_token is not None:
|
|
93
|
+
if isinstance(response, dict):
|
|
94
|
+
response["statezero_sync_token_match"] = True
|
|
95
|
+
else:
|
|
96
|
+
response = {
|
|
97
|
+
"auth": response,
|
|
98
|
+
"statezero_sync_token_match": True,
|
|
99
|
+
}
|
|
80
100
|
logger.debug(f"Authentication successful for channel: {channel_name}")
|
|
81
101
|
return Response(response, status=status.HTTP_200_OK)
|
|
82
102
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: statezero
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0b65
|
|
4
4
|
Summary: Connect your Python backend to a modern JavaScript SPA frontend with 90% less complexity.
|
|
5
5
|
Author-email: Robert <robert.herring@statezero.dev>
|
|
6
6
|
Project-URL: homepage, https://www.statezero.dev
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/extensions/simple_history.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/search_providers/__init__.py
RENAMED
|
File without changes
|
{statezero-0.1.0b64 → statezero-0.1.0b65}/statezero/adaptors/django/search_providers/basic_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|