ashb commented on code in PR #72262:
URL: https://github.com/apache/airflow/pull/72262#discussion_r4091874443


##########
providers/edge3/src/airflow/providers/edge3/worker_api/auth.py:
##########
@@ -52,7 +53,15 @@ class WorkerTokenAuthorization(TypedDict, total=False):
     authorized: bool
 
 
-def _default_jwt_verifier(claims: dict) -> WorkerTokenAuthorization:
+@dataclass(frozen=True)
+class WorkerTokenContext:
+    """Request context passed to a ``[edge] jwt_verifier`` alongside the token 
claims."""

Review Comment:
   He did say just method, but given this:
   
   >  the worker routes are @worker_router.post("/{worker_name}") — so the path 
carries the worker name. An operator who wants their verifier to ask "does this 
token's sub match the worker it's addressing?" currently can't.
   
   I'd say passing the whole Request object is better, and means we don't need 
a new type either.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to