-
Notifications
You must be signed in to change notification settings - Fork 127
Implement wrapper method of issue_stateless_channel_token #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
938f477
Implement wrapper method of issue_stateless_channel_token
habara-k 6355d46
Exclude generator directory from rubocop inspection
habara-k 5c2e49c
Support *_with_http_info
habara-k 286a30b
Add in-code docs
habara-k 2a15002
Fix in-code docs
habara-k deea1ea
Add comments to rbs files
habara-k 693fda9
Fix docs
habara-k a60473d
Add missed comments
habara-k d112ad4
Suppress deprecated warning
habara-k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...rator/src/main/resources/line-bot-sdk-ruby-generator/body/api/ChannelAccessTokenClient.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_jwt_assertion_with_http_info} instead of this. | ||
| # | ||
| # @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200 | ||
| # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_jwt_assertion( | ||
| client_assertion: | ||
| ) | ||
| issue_stateless_channel_token( # steep:ignore DeprecatedReference | ||
| grant_type: 'client_credentials', | ||
| client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', | ||
| client_assertion: client_assertion | ||
| ) | ||
| end | ||
|
|
||
| # Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for client secret authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_client_secret_with_http_info} instead of this. | ||
| # | ||
| # @param client_id [String] Channel ID. | ||
| # @param client_secret [String] Channel secret. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200 | ||
| # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_client_secret( | ||
| client_id:, | ||
| client_secret: | ||
| ) | ||
| issue_stateless_channel_token( # steep:ignore DeprecatedReference | ||
| grant_type: 'client_credentials', | ||
| client_id: client_id, | ||
| client_secret: client_secret | ||
| ) | ||
| end | ||
|
|
||
| # Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase. | ||
| # | ||
| # @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200 | ||
| # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_jwt_assertion_with_http_info( | ||
| client_assertion: | ||
| ) | ||
| issue_stateless_channel_token_with_http_info( # steep:ignore DeprecatedReference | ||
| grant_type: 'client_credentials', | ||
| client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', | ||
| client_assertion: client_assertion | ||
| ) | ||
| end | ||
|
|
||
| # Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for client secret authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase. | ||
| # | ||
| # @param client_id [String] Channel ID. | ||
| # @param client_secret [String] Channel secret. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200 | ||
| # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_client_secret_with_http_info( | ||
| client_id:, | ||
| client_secret: | ||
| ) | ||
| issue_stateless_channel_token_with_http_info( # steep:ignore DeprecatedReference | ||
| grant_type: 'client_credentials', | ||
| client_id: client_id, | ||
| client_secret: client_secret | ||
| ) | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
.../src/main/resources/line-bot-sdk-ruby-rbs-generator/body/api/ChannelAccessTokenClient.rbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_jwt_assertion_with_http_info} instead of this. | ||
| # | ||
| # @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200 | ||
| # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_jwt_assertion: ( | ||
| client_assertion: String | ||
| ) -> ( | ||
| IssueStatelessChannelAccessTokenResponse # when HTTP status code is 200 | ||
| | String? # otherwise | ||
| ) | ||
|
|
||
| # Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for client secret authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_client_secret_with_http_info} instead of this. | ||
| # | ||
| # @param client_id [String] Channel ID. | ||
| # @param client_secret [String] Channel secret. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200 | ||
| # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_client_secret: ( | ||
| client_id: String, | ||
| client_secret: String | ||
| ) -> ( | ||
| IssueStatelessChannelAccessTokenResponse # when HTTP status code is 200 | ||
| | String? # otherwise | ||
| ) | ||
|
|
||
| # Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase. | ||
| # | ||
| # @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200 | ||
| # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_jwt_assertion_with_http_info: ( | ||
| client_assertion: String | ||
| ) -> ( | ||
| [IssueStatelessChannelAccessTokenResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200 | ||
| | [String?, Integer, Hash[untyped, untyped]] # otherwise | ||
| ) | ||
|
|
||
| # Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. | ||
| # This is a convenience wrapper that only requires the parameters needed for client secret authentication. | ||
| # This requests to <code>POST https://api.line.me/oauth2/v3/token</code> | ||
| # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase. | ||
| # | ||
| # @param client_id [String] Channel ID. | ||
| # @param client_secret [String] Channel secret. | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token | ||
| # @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200 | ||
| # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself. | ||
| def issue_stateless_channel_token_by_client_secret_with_http_info: ( | ||
| client_id: String, | ||
| client_secret: String | ||
| ) -> ( | ||
| [IssueStatelessChannelAccessTokenResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200 | ||
| | [String?, Integer, Hash[untyped, untyped]] # otherwise | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add comment in rbs file too?