usso 0.24.0__tar.gz → 0.24.2__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 (27) hide show
  1. {usso-0.24.0/src/usso.egg-info → usso-0.24.2}/PKG-INFO +1 -1
  2. {usso-0.24.0 → usso-0.24.2}/pyproject.toml +1 -1
  3. {usso-0.24.0 → usso-0.24.2}/src/usso/django/middleware.py +2 -5
  4. {usso-0.24.0 → usso-0.24.2/src/usso.egg-info}/PKG-INFO +1 -1
  5. {usso-0.24.0 → usso-0.24.2}/LICENSE.txt +0 -0
  6. {usso-0.24.0 → usso-0.24.2}/README.md +0 -0
  7. {usso-0.24.0 → usso-0.24.2}/setup.cfg +0 -0
  8. {usso-0.24.0 → usso-0.24.2}/src/usso/__init__.py +0 -0
  9. {usso-0.24.0 → usso-0.24.2}/src/usso/api.py +0 -0
  10. {usso-0.24.0 → usso-0.24.2}/src/usso/async_api.py +0 -0
  11. {usso-0.24.0 → usso-0.24.2}/src/usso/async_session.py +0 -0
  12. {usso-0.24.0 → usso-0.24.2}/src/usso/b64tools.py +0 -0
  13. {usso-0.24.0 → usso-0.24.2}/src/usso/core.py +0 -0
  14. {usso-0.24.0 → usso-0.24.2}/src/usso/django/__init__.py +0 -0
  15. {usso-0.24.0 → usso-0.24.2}/src/usso/exceptions.py +0 -0
  16. {usso-0.24.0 → usso-0.24.2}/src/usso/fastapi/__init__.py +0 -0
  17. {usso-0.24.0 → usso-0.24.2}/src/usso/fastapi/integration.py +0 -0
  18. {usso-0.24.0 → usso-0.24.2}/src/usso/package_data.dat +0 -0
  19. {usso-0.24.0 → usso-0.24.2}/src/usso/session.py +0 -0
  20. {usso-0.24.0 → usso-0.24.2}/src/usso.egg-info/SOURCES.txt +0 -0
  21. {usso-0.24.0 → usso-0.24.2}/src/usso.egg-info/dependency_links.txt +0 -0
  22. {usso-0.24.0 → usso-0.24.2}/src/usso.egg-info/entry_points.txt +0 -0
  23. {usso-0.24.0 → usso-0.24.2}/src/usso.egg-info/requires.txt +0 -0
  24. {usso-0.24.0 → usso-0.24.2}/src/usso.egg-info/top_level.txt +0 -0
  25. {usso-0.24.0 → usso-0.24.2}/tests/test_api.py +0 -0
  26. {usso-0.24.0 → usso-0.24.2}/tests/test_core.py +0 -0
  27. {usso-0.24.0 → usso-0.24.2}/tests/test_simple.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: usso
3
- Version: 0.24.0
3
+ Version: 0.24.2
4
4
  Summary: A plug-and-play client for integrating universal single sign-on (SSO) with Python frameworks, enabling secure and seamless authentication across microservices.
5
5
  Author-email: Mahdi Kiani <mahdikiany@gmail.com>
6
6
  Maintainer-email: Mahdi Kiani <mahdikiany@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "usso"
7
- version = "0.24.0"
7
+ version = "0.24.2"
8
8
  description = "A plug-and-play client for integrating universal single sign-on (SSO) with Python frameworks, enabling secure and seamless authentication across microservices."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -30,10 +30,7 @@ class USSOAuthenticationMiddleware(MiddlewareMixin):
30
30
  # Attach the user to the request
31
31
  request.user = user
32
32
  else:
33
- return JsonResponse(
34
- {"error": "Authentication failed: No valid JWT token provided."},
35
- status=401,
36
- )
33
+ return None
37
34
  except USSOException as e:
38
35
  # Handle any errors raised by USSO authentication
39
36
  return JsonResponse({"error": str(e)}, status=401)
@@ -55,7 +52,7 @@ class USSOAuthenticationMiddleware(MiddlewareMixin):
55
52
  if not token:
56
53
  raise USSOException(
57
54
  status_code=401,
58
- error="Unauthorized",
55
+ error="unauthorized",
59
56
  )
60
57
 
61
58
  # Get user data from the token
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: usso
3
- Version: 0.24.0
3
+ Version: 0.24.2
4
4
  Summary: A plug-and-play client for integrating universal single sign-on (SSO) with Python frameworks, enabling secure and seamless authentication across microservices.
5
5
  Author-email: Mahdi Kiani <mahdikiany@gmail.com>
6
6
  Maintainer-email: Mahdi Kiani <mahdikiany@gmail.com>
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