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


##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -457,14 +457,28 @@ def register_views(self) -> None:
         """Register views specific to the auth manager."""
 
     @staticmethod
-    def _get_token_signer():
+    def _get_token_signer() -> JWTGenerator:
         """
         Return the signer used to sign JWT token.
 
         :meta private:
         """
-        return JWTSigner(
-            secret_key=get_signing_key("api", "auth_jwt_secret"),
-            expiration_time_in_seconds=conf.getint("api", 
"auth_jwt_expiration_time"),
+        return JWTGenerator(
+            secret_key=get_signing_key("api_auth", "jwt_secret"),
+            valid_for=conf.getint("api", "auth_jwt_expiration_time"),
+            audience="front-apis",
+        )
+
+    @staticmethod
+    def _get_token_validator() -> JWTValidator:
+        """
+        Return the signer used to sign JWT token.
+
+        :meta private:
+        """
+        return JWTValidator(
+            # issuer=conf.get("api_auth", "jwt_iussuer"),
+            secret_key=get_signing_key("api_auth", "jwt_secret"),
+            leeway=conf.getint("api", "auth_jwt_expiration_time"),

Review Comment:
   Good catch, agreed. (It _did_ before, there was just a single thing but yeah 
that is wrong)



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