@@ -104,25 +104,27 @@ def revoke_channel_token(access_token)
104104
105105 # Issue channel access token v2.1
106106 #
107- # @param grant_type [string] client_assertion
107+ # @param grant_type [String] jwt
108108 #
109109 # @return [Net::HTTPResponse]
110110 def issue_channel_access_token_21 ( jwt )
111111 channel_id_required
112112 channel_secret_required
113113
114114 endpoint_path = '/oauth2/v2.1/token'
115- payload = uri . encode_www_form (
115+ payload = URI . encode_www_form (
116116 grant_type : 'client_credentials' ,
117117 client_assertion_type : 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' ,
118118 client_assertion : jwt
119119 )
120- headers = { 'content-type ' => 'application/x-www-form-urlencoded' }
120+ headers = { 'Content-Type ' => 'application/x-www-form-urlencoded' }
121121 post ( endpoint , endpoint_path , payload , headers )
122122 end
123123
124124 # Revoke channel access token v2.1
125125 #
126+ # @param access_token [String]
127+ #
126128 # @return [Net::HTTPResponse]
127129 def revoke_channel_access_token_21 ( access_token )
128130 channel_id_required
@@ -140,18 +142,20 @@ def revoke_channel_access_token_21(access_token)
140142
141143 # Get all valid channel access token key IDs v2.1
142144 #
145+ # @param jwt [String]
146+ #
143147 # @return [Net::HTTPResponse]
144148 def get_channel_access_token_key_ids_21 ( jwt )
145149 channel_id_required
146150 channel_secret_required
147151
148152 endpoint_path = '/oauth2/v2.1/kid'
149- payload = uri . encode_www_form (
153+ payload = URI . encode_www_form (
150154 grant_type : 'client_credentials' ,
151155 client_assertion_type : 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' ,
152156 client_assertion : jwt
153157 )
154- headers = { 'content-type ' => 'application/x-www-form-urlencoded' }
158+ headers = { 'Content-Type ' => 'application/x-www-form-urlencoded' }
155159 post ( endpoint , endpoint_path , payload , headers )
156160 end
157161
0 commit comments