From 9ce7da732249cea173ad5139b304775d18f7b51e Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Thu, 19 Oct 2023 12:50:01 +0530 Subject: [PATCH] Upd: Add endpoint for exchange authorisation code to obtain access token Signed-off-by: George J Padayatti --- openapi/v2023.8.2/bundled.yaml | 45 +++++++++++++++++++ openapi/v2023.8.2/definitions/UserInfo.yaml | 13 ++++++ openapi/v2023.8.2/index.yaml | 3 ++ .../parameters/authorisationCode.yaml | 6 +++ openapi/v2023.8.2/parameters/redirectUri.yaml | 6 +++ .../v2023.8.2/paths/exchangeCodeForToken.yaml | 21 +++++++++ 6 files changed, 94 insertions(+) create mode 100644 openapi/v2023.8.2/definitions/UserInfo.yaml create mode 100644 openapi/v2023.8.2/parameters/authorisationCode.yaml create mode 100644 openapi/v2023.8.2/parameters/redirectUri.yaml create mode 100644 openapi/v2023.8.2/paths/exchangeCodeForToken.yaml diff --git a/openapi/v2023.8.2/bundled.yaml b/openapi/v2023.8.2/bundled.yaml index 5adfb59..02fd40d 100644 --- a/openapi/v2023.8.2/bundled.yaml +++ b/openapi/v2023.8.2/bundled.yaml @@ -2890,6 +2890,51 @@ paths: security: [] tags: - onboard + /onboard/token/exchange: + post: + deprecated: false + description: Exchange authorisation code for access token + operationId: exchangeCodeForToken + parameters: + - description: Unique ID of an object + in: query + name: redirectUri + required: true + schema: + type: string + - description: Unique ID of an object + in: query + name: authorisationCode + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + userInfo: + required: + - subject + type: object + title: Token + properties: + subject: + type: string + profile: + type: string + email: + type: string + emailVerified: + type: boolean + token: + $ref: '#/paths/~1onboard~1admin~1login/post/responses/200/content/application~1json/schema' + description: OK + security: [] + tags: + - onboard /onboard/validate/email: post: operationId: validateEmail diff --git a/openapi/v2023.8.2/definitions/UserInfo.yaml b/openapi/v2023.8.2/definitions/UserInfo.yaml new file mode 100644 index 0000000..0ab6584 --- /dev/null +++ b/openapi/v2023.8.2/definitions/UserInfo.yaml @@ -0,0 +1,13 @@ +required: + - subject +type: object +title: Token +properties: + subject: + type: string + profile: + type: string + email: + type: string + emailVerified: + type: boolean diff --git a/openapi/v2023.8.2/index.yaml b/openapi/v2023.8.2/index.yaml index 0e2ff0c..7128fa5 100644 --- a/openapi/v2023.8.2/index.yaml +++ b/openapi/v2023.8.2/index.yaml @@ -213,6 +213,9 @@ paths: /onboard/token/refresh: post: $ref: ./paths/refreshToken.yaml + /onboard/token/exchange: + post: + $ref: ./paths/exchangeCodeForToken.yaml /onboard/validate/email: post: $ref: ./paths/validateEmail.yaml diff --git a/openapi/v2023.8.2/parameters/authorisationCode.yaml b/openapi/v2023.8.2/parameters/authorisationCode.yaml new file mode 100644 index 0000000..abb78c4 --- /dev/null +++ b/openapi/v2023.8.2/parameters/authorisationCode.yaml @@ -0,0 +1,6 @@ +description: Unique ID of an object +in: query +name: authorisationCode +required: true +schema: + type: string \ No newline at end of file diff --git a/openapi/v2023.8.2/parameters/redirectUri.yaml b/openapi/v2023.8.2/parameters/redirectUri.yaml new file mode 100644 index 0000000..b7cc1a1 --- /dev/null +++ b/openapi/v2023.8.2/parameters/redirectUri.yaml @@ -0,0 +1,6 @@ +description: Unique ID of an object +in: query +name: redirectUri +required: true +schema: + type: string \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/exchangeCodeForToken.yaml b/openapi/v2023.8.2/paths/exchangeCodeForToken.yaml new file mode 100644 index 0000000..a239edf --- /dev/null +++ b/openapi/v2023.8.2/paths/exchangeCodeForToken.yaml @@ -0,0 +1,21 @@ +deprecated: false +description: Exchange authorisation code for access token +operationId: exchangeCodeForToken +parameters: + - $ref: "../parameters/redirectUri.yaml" + - $ref: "../parameters/authorisationCode.yaml" +responses: + "200": + content: + application/json: + schema: + type: object + properties: + userInfo: + $ref: "../definitions/UserInfo.yaml" + token: + $ref: "../definitions/Token.yaml" + description: OK +security: [] +tags: + - onboard