Skip to content

Commit

Permalink
Low-code CDK: Improve grant type documentation (#26335)
Browse files Browse the repository at this point in the history
* improve grant type documentation

* for the other

* Automated Commit - Formatting Changes

---------

Co-authored-by: flash1293 <flash1293@users.noreply.github.com>
  • Loading branch information
Joe Reuter and flash1293 committed May 22, 2023
1 parent 80032f7 commit 13752e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,12 @@ definitions:
- expires_in
grant_type:
title: Grant Type
description: How the access token is granted.
description: Specifies the OAuth2 grant type. If set to refresh_token, the refresh_token needs to be provided as well. For client_credentials, only client id and secret are required. Other grant types are not officially supported.
type: string
default: "refresh_token"
examples:
- refresh_token
- client_credentials
refresh_request_body:
title: Refresh Request Body
description: Body of the request sent to get a new access token.
Expand Down Expand Up @@ -825,11 +826,12 @@ definitions:
- "expires_in"
grant_type:
title: Grant Type
description: How the access token is granted.
description: Specifies the OAuth2 grant type. If set to refresh_token, the refresh_token needs to be provided as well. For client_credentials, only client id and secret are required. Other grant types are not officially supported.
type: string
default: "refresh_token"
examples:
- refresh_token
- client_credentials
refresh_request_body:
title: Refresh Request Body
description: Body of the request sent to get a new access token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ class OAuthAuthenticator(BaseModel):
)
grant_type: Optional[str] = Field(
"refresh_token",
description="How the access token is granted.",
examples=["refresh_token"],
description="Specifies the OAuth2 grant type. If set to refresh_token, the refresh_token needs to be provided as well. For client_credentials, only client id and secret are required. Other grant types are not officially supported.",
examples=["refresh_token", "client_credentials"],
title="Grant Type",
)
refresh_request_body: Optional[Dict[str, Any]] = Field(
Expand Down Expand Up @@ -400,8 +400,8 @@ class SingleUseRefreshTokenOAuthAuthenticator(BaseModel):
)
grant_type: Optional[str] = Field(
"refresh_token",
description="How the access token is granted.",
examples=["refresh_token"],
description="Specifies the OAuth2 grant type. If set to refresh_token, the refresh_token needs to be provided as well. For client_credentials, only client id and secret are required. Other grant types are not officially supported.",
examples=["refresh_token", "client_credentials"],
title="Grant Type",
)
refresh_request_body: Optional[Dict[str, Any]] = Field(
Expand Down

0 comments on commit 13752e2

Please sign in to comment.