Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/httpclient/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5001,6 +5001,9 @@ components:
code:
type: string
x-formData-name: code
code_verifier:
type: string
x-formData-name: code_verifier
grant_type:
required:
- grant_type
Expand Down
9 changes: 9 additions & 0 deletions internal/httpclient/api_o_auth2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions internal/httpclient/docs/OAuth2API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ No authorization required

## Oauth2TokenExchange

> OAuth2TokenExchange Oauth2TokenExchange(ctx).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute()
> OAuth2TokenExchange Oauth2TokenExchange(ctx).GrantType(grantType).ClientId(clientId).Code(code).CodeVerifier(codeVerifier).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute()

The OAuth 2.0 Token Endpoint

Expand All @@ -1340,12 +1340,13 @@ func main() {
grantType := "grantType_example" // string |
clientId := "clientId_example" // string | (optional)
code := "code_example" // string | (optional)
codeVerifier := "codeVerifier_example" // string | (optional)
redirectUri := "redirectUri_example" // string | (optional)
refreshToken := "refreshToken_example" // string | (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OAuth2API.Oauth2TokenExchange(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute()
resp, r, err := apiClient.OAuth2API.Oauth2TokenExchange(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).CodeVerifier(codeVerifier).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.Oauth2TokenExchange``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand All @@ -1369,6 +1370,7 @@ Name | Type | Description | Notes
**grantType** | **string** | |
**clientId** | **string** | |
**code** | **string** | |
**codeVerifier** | **string** | |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix malformed Markdown table row for codeVerifier

Line 1373 is missing a properly terminated 4th cell, causing markdownlint MD055/MD056 warnings. This can break rendered docs/table alignment in some viewers.

Suggested fix
- **codeVerifier** | **string** |  | 
+ **codeVerifier** | **string** |  |  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**codeVerifier** | **string** | |
**codeVerifier** | **string** | | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 1373-1373: Table pipe style
Expected: no_leading_or_trailing; Actual: trailing_only; Unexpected trailing pipe

(MD055, table-pipe-style)


[warning] 1373-1373: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data

(MD056, table-column-count)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/httpclient/docs/OAuth2API.md` at line 1373, The markdown table row
for codeVerifier is missing the trailing cell separator; update the table row
for "codeVerifier" (the row showing **codeVerifier** | **string** |  |) to
include the fourth cell delimiter by adding a trailing pipe so the row has four
cells properly terminated, ensuring the table aligns and fixes markdownlint
MD055/MD056 warnings.

**redirectUri** | **string** | |
**refreshToken** | **string** | |

Expand Down
3 changes: 3 additions & 0 deletions oauth2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,9 @@ type _ struct {

// in: formData
ClientID string `json:"client_id"`

// in: formData
CodeVerifier string `json:"code_verifier"`
}

// OAuth2 Token Exchange Result
Expand Down
4 changes: 4 additions & 0 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4088,6 +4088,10 @@
"type": "string",
"x-formData-name": "code"
},
"code_verifier": {
"type": "string",
"x-formData-name": "code_verifier"
},
"grant_type": {
"required": [
"grant_type"
Expand Down
5 changes: 5 additions & 0 deletions spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,11 @@
"type": "string",
"name": "client_id",
"in": "formData"
},
{
"type": "string",
"name": "code_verifier",
"in": "formData"
}
],
"responses": {
Expand Down
Loading