@@ -104,25 +104,27 @@ def revoke_channel_token(access_token)
104
104
105
105
# Issue channel access token v2.1
106
106
#
107
- # @param grant_type [string] client_assertion
107
+ # @param grant_type [String] jwt
108
108
#
109
109
# @return [Net::HTTPResponse]
110
110
def issue_channel_access_token_21 ( jwt )
111
111
channel_id_required
112
112
channel_secret_required
113
113
114
114
endpoint_path = '/oauth2/v2.1/token'
115
- payload = uri . encode_www_form (
115
+ payload = URI . encode_www_form (
116
116
grant_type : 'client_credentials' ,
117
117
client_assertion_type : 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' ,
118
118
client_assertion : jwt
119
119
)
120
- headers = { 'content-type ' => 'application/x-www-form-urlencoded' }
120
+ headers = { 'Content-Type ' => 'application/x-www-form-urlencoded' }
121
121
post ( endpoint , endpoint_path , payload , headers )
122
122
end
123
123
124
124
# Revoke channel access token v2.1
125
125
#
126
+ # @param access_token [String]
127
+ #
126
128
# @return [Net::HTTPResponse]
127
129
def revoke_channel_access_token_21 ( access_token )
128
130
channel_id_required
@@ -140,18 +142,20 @@ def revoke_channel_access_token_21(access_token)
140
142
141
143
# Get all valid channel access token key IDs v2.1
142
144
#
145
+ # @param jwt [String]
146
+ #
143
147
# @return [Net::HTTPResponse]
144
148
def get_channel_access_token_key_ids_21 ( jwt )
145
149
channel_id_required
146
150
channel_secret_required
147
151
148
152
endpoint_path = '/oauth2/v2.1/kid'
149
- payload = uri . encode_www_form (
153
+ payload = URI . encode_www_form (
150
154
grant_type : 'client_credentials' ,
151
155
client_assertion_type : 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' ,
152
156
client_assertion : jwt
153
157
)
154
- headers = { 'content-type ' => 'application/x-www-form-urlencoded' }
158
+ headers = { 'Content-Type ' => 'application/x-www-form-urlencoded' }
155
159
post ( endpoint , endpoint_path , payload , headers )
156
160
end
157
161
0 commit comments