plain.auth 0.13.0__py3-none-any.whl → 0.14.0__py3-none-any.whl

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.
plain/auth/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # plain-auth changelog
2
2
 
3
+ ## [0.14.0](https://github.com/dropseed/plain/releases/plain-auth@0.14.0) (2025-07-18)
4
+
5
+ ### What's changed
6
+
7
+ - Added OpenTelemetry tracing support with automatic user ID attribute setting in auth middleware ([b0224d0](https://github.com/dropseed/plain/commit/b0224d0418))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
3
13
  ## [0.13.0](https://github.com/dropseed/plain/releases/plain-auth@0.13.0) (2025-06-23)
4
14
 
5
15
  ### What's changed
plain/auth/middleware.py CHANGED
@@ -1,3 +1,6 @@
1
+ from opentelemetry import trace
2
+ from opentelemetry.semconv._incubating.attributes.user_attributes import USER_ID
3
+
1
4
  from plain import auth
2
5
  from plain.exceptions import ImproperlyConfigured
3
6
  from plain.utils.functional import SimpleLazyObject
@@ -6,6 +9,8 @@ from plain.utils.functional import SimpleLazyObject
6
9
  def get_user(request):
7
10
  if not hasattr(request, "_cached_user"):
8
11
  request._cached_user = auth.get_user(request)
12
+ if request._cached_user:
13
+ trace.get_current_span().set_attribute(USER_ID, request._cached_user.id)
9
14
  return request._cached_user
10
15
 
11
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.auth
3
- Version: 0.13.0
3
+ Version: 0.14.0
4
4
  Summary: User authentication and authorization for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,13 +1,13 @@
1
- plain/auth/CHANGELOG.md,sha256=2afv0YFvPDyfa1tAzZX-U4O2voP1QkIFdcF44Uhduag,378
1
+ plain/auth/CHANGELOG.md,sha256=HLL1Eg5zrQtrC1rm5X3-_KH9E2Mo5n9lvv9sS8Lq0uo,699
2
2
  plain/auth/README.md,sha256=RJ8ry-ukLtLqcjRVAZ5cd1JgCr-JcUTi_9Kkg4kGmHc,2408
3
3
  plain/auth/__init__.py,sha256=Id4ON6caLuZoZhu_kL6aMrwnN3Y8gPGVrVGs_V3ofAE,142
4
4
  plain/auth/default_settings.py,sha256=65VzDn3j61OMn78Lg6Zuds4A8QKzJJ_0G9KoFqAOIRo,466
5
- plain/auth/middleware.py,sha256=K7e9n5vMvGnALKcjG92AhWQMsZ8brIuS9M9zNZqt_RI,954
5
+ plain/auth/middleware.py,sha256=yiuJ6jg4PW5FpGFEzOzg5SLTjcheRTVPvo4NlmeBKws,1186
6
6
  plain/auth/sessions.py,sha256=GCfXyGQhdSvMwKK3DpqK7fYjw2PiKbcZisWfrEeTRVM,5802
7
7
  plain/auth/test.py,sha256=KfZSiX9S0p3AtCFAS4dUz4ctGIpOmLAGR-8nxAtM2TY,1163
8
8
  plain/auth/utils.py,sha256=eEON0Mo928l-aW5tqBuoTdVke8aP4majxVtAFoLroSE,1280
9
9
  plain/auth/views.py,sha256=_igztEBQKSM4CZro2lvlK0m01eIksqbmyux4w8gY1ks,4095
10
- plain_auth-0.13.0.dist-info/METADATA,sha256=Hn0_O5AEclxmsrudT9yYLiYbI2R3ieZjrPbG4pE7xdU,2762
11
- plain_auth-0.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- plain_auth-0.13.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
13
- plain_auth-0.13.0.dist-info/RECORD,,
10
+ plain_auth-0.14.0.dist-info/METADATA,sha256=blTwTTPWEtlXD_SiajyHmObWXU_mLuyoCWnfwO2vmqo,2762
11
+ plain_auth-0.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ plain_auth-0.14.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
13
+ plain_auth-0.14.0.dist-info/RECORD,,