Skip to content

Commit d1812b6

Browse files
committed
Fix typo and endpoint_path
1 parent 4824b60 commit d1812b6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/line/bot/client.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def revoke_channel_token(access_token)
104104

105105
# Issue channel access token v2.1
106106
#
107-
# @param grant_type [String] jwt
107+
# @param jwt [String]
108108
#
109109
# @return [Net::HTTPResponse]
110110
def issue_channel_access_token_21(jwt)
@@ -132,8 +132,8 @@ def revoke_channel_access_token_21(access_token)
132132

133133
endpoint_path = '/oauth2/v2.1/revoke'
134134
payload = URI.encode_www_form(
135-
client_id: client_id,
136-
client_secret: client_secret,
135+
client_id: channel_id,
136+
client_secret: channel_secret,
137137
access_token: access_token
138138
)
139139
headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
@@ -149,7 +149,7 @@ def get_channel_access_token_key_ids_21(jwt)
149149
channel_id_required
150150
channel_secret_required
151151

152-
endpoint_path = '/oauth2/v2.1/kid'
152+
endpoint_path = '/oauth2/v2.1/tokens/kid'
153153
payload = URI.encode_www_form(
154154
grant_type: 'client_credentials',
155155
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',

spec/line/bot/client_channel_token_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def generate_client
9595

9696
client = generate_client
9797

98-
response = client.revoke_channel_access_token_21('sDTOzw5wIfxxxxPEzcmeQA'):
98+
response = client.revoke_channel_access_token_21('sDTOzw5wIfxxxxPEzcmeQA')
9999

100100
expect(response).to be_a(Net::HTTPOK)
101101
end

0 commit comments

Comments
 (0)