You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/01 16:19:23 UTC

[GitHub] [airflow] bbovenzi commented on a change in pull request #15042: Add REST API auth flow for the new UI

bbovenzi commented on a change in pull request #15042:
URL: https://github.com/apache/airflow/pull/15042#discussion_r605784949



##########
File path: airflow/api_connexion/openapi/v1.yaml
##########
@@ -1490,6 +1490,142 @@ paths:
         '404':
           $ref: '#/components/responses/NotFound'
 
+  /auth-info:
+    get:
+      summary: Get site authentication information
+      x-openapi-router-controller: airflow.api_connexion.endpoints.auth_endpoint
+      operationId: get_auth_info
+      tags: [Authentication]
+      responses:
+        '200':
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/AuthInfo'
+
+  /auth/login:
+    post:
+      summary: Login user
+      x-openapi-router-controller: airflow.api_connexion.endpoints.auth_endpoint
+      operationId: auth_login
+      tags: [Authentication]
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/AuthDBLoginForm'
+      responses:
+        '200':
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/JwtAuthAndUser'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthenticated'
+
+
+  /auth-oauth/{provider}:
+    get:
+      summary: OAUTH user login
+      x-openapi-router-controller: airflow.api_connexion.endpoints.auth_endpoint
+      operationId: auth_oauthlogin
+      tags: [Authentication]
+      parameters:
+        - $ref: '#/components/parameters/ShouldRegister'
+        - $ref: '#/components/parameters/OauthProvider'
+        - $ref: '#/components/parameters/RedirectUrl'
+      responses:
+        '200':
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/AuthorizationUrl'
+
+  /oauth-authorized/{provider}:
+    parameters:
+      - $ref: '#/components/parameters/OauthProvider'
+    get:
+      summary: Oauth authentication
+      x-openapi-router-controller: airflow.api_connexion.endpoints.auth_endpoint
+      operationId: authorize_oauth
+      tags: [Authentication]
+      parameters:
+        - $ref: '#/components/parameters/AuthState'
+      responses:
+        '200':
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/JwtAuthAndUser'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthenticated'
+
+
+  /auth-remoteuser:
+    get:
+      summary: Authenticate using remote user auth
+      x-openapi-router-controller: airflow.api_connexion.endpoints.auth_endpoint
+      operationId: auth_remoteuser
+      tags: [Authentication]
+      responses:
+        '200':
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/JwtAuthAndUser'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthenticated'
+
+  /refresh:
+    post:
+      summary: Refresh a token
+      description: Accepts fresh token and creates access token

Review comment:
       Typo: it should say `Accepts refresh token` not `Accepts fresh token`




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org