aaron-wolmutt commented on code in PR #58292:
URL: https://github.com/apache/airflow/pull/58292#discussion_r2558298377


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/auth.py:
##########
@@ -26,3 +26,21 @@ class MenuItemCollectionResponse(BaseModel):
 
     authorized_menu_items: list[MenuItem]
     extra_menu_items: list[ExtraMenuItem]
+
+
+class SimpleAuthenticatedMeResponse(BaseModel):
+    """Current User (me) response serializer for SimpleAuth."""
+
+    username: str
+    role: str | None
+
+
+class FabAuthenticatedMeResponse(BaseModel):
+    """Current User (me) response serializer for FAB auth."""
+
+    id: int | str
+    first_name: str
+    last_name: str
+    username: str
+    email: str
+    roles: list[str] | None = None

Review Comment:
   Removed the multiple serializers per auth manager and added the extras field 
like this. extras are implemented in the providers auth manager. 
   
   ```python
   class AuthenticatedMeResponse(BaseModel):
       """Authenticated user information serializer for responses."""
   
       id: str
       username: str
       extras: dict[str, str] = {}
   ```



-- 
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