This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ef312654487 Document API token response details (#71583)
ef312654487 is described below

commit ef312654487e2691d9bed74311b54a90513a8882
Author: feberbo <[email protected]>
AuthorDate: Fri Aug 14 12:27:32 2026 -0300

    Document API token response details (#71583)
---
 airflow-core/docs/security/api.rst        | 11 +++++++++++
 providers/fab/docs/auth-manager/token.rst | 14 +++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/airflow-core/docs/security/api.rst 
b/airflow-core/docs/security/api.rst
index b45616ece89..cd626661c9b 100644
--- a/airflow-core/docs/security/api.rst
+++ b/airflow-core/docs/security/api.rst
@@ -32,6 +32,7 @@ To interact with the Airflow API, clients must first 
authenticate and obtain a J
 The token can be generated by making a ``POST`` request to the ``/auth/token`` 
endpoint, passing the necessary
 credentials (e.g., username and password). The ``/auth/token`` endpoint is 
provided by the auth manager, therefore,
 please read the documentation of the auth manager configured in your 
environment for more details.
+The request format and supported content types are also defined by the 
configured auth manager.
 
 The list of supported auth managers is available in 
:doc:`apache-airflow-providers:core-extensions/auth-managers` list.
 
@@ -40,6 +41,9 @@ Example
 
 Request
 
+The following example uses a JSON request body. Check the configured auth
+manager's documentation for its required request format and content type.
+
 .. code-block:: bash
 
     ENDPOINT_URL="http://localhost:8080";
@@ -52,12 +56,19 @@ Request
 
 Response
 
+The successful response status code and response fields are defined by the
+configured auth manager. Auth managers return the JWT in the ``access_token``
+field. For example:
+
 .. code-block:: json
 
   {
     "access_token": "<JWT-TOKEN>"
   }
 
+For the status code and any additional response fields, see the documentation
+for the auth manager configured in your environment.
+
 Use the JWT token to call Airflow public API
 
 .. code-block:: bash
diff --git a/providers/fab/docs/auth-manager/token.rst 
b/providers/fab/docs/auth-manager/token.rst
index 80afe990227..cff84f24a87 100644
--- a/providers/fab/docs/auth-manager/token.rst
+++ b/providers/fab/docs/auth-manager/token.rst
@@ -32,6 +32,8 @@ Example
 '''''''
 
 Use the following example to generate a token via username and password.
+The FAB auth manager expects a JSON request body, so set the content type to
+``application/json``.
 
 .. code-block:: bash
 
@@ -44,7 +46,17 @@ Use the following example to generate a token via username 
and password.
         "password": "<password>"
         }'
 
-If successful, this request returns a JWT token that you can use for 
subsequent Airflow public API calls.
+If successful, this request returns ``201 Created`` and a JSON response
+containing the JWT token:
+
+.. code-block:: json
+
+    {
+        "access_token": "<JWT-TOKEN>"
+    }
+
+Use the token in the ``Authorization`` header for subsequent Airflow public API
+calls.
 
 Only users authenticated via the database (``AUTH_TYPE = AUTH_DB``) or LDAP
 (``AUTH_TYPE = AUTH_LDAP``) can generate tokens using this method.

Reply via email to