File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def digest
6262 end
6363
6464 def authentication_payload ( host :, time_now :)
65- payload = {
65+ {
6666 'version' : "2020_10_22" ,
6767 'host' : host ,
6868 'user-agent' : "ruby-kafka" ,
@@ -72,12 +72,9 @@ def authentication_payload(host:, time_now:)
7272 'x-amz-date' : time_now . strftime ( "%Y%m%dT%H%M%SZ" ) ,
7373 'x-amz-signedheaders' : "host" ,
7474 'x-amz-expires' : "900" ,
75+ 'x-amz-security-token' : @session_token ,
7576 'x-amz-signature' : signature ( host : host , time_now : time_now )
76- }
77-
78- payload [ 'x-amz-security-token' ] = @session_token unless @session_token . nil?
79-
80- payload . to_json
77+ } . to_json
8178 end
8279
8380 def canonical_request ( host :, time_now :)
@@ -96,6 +93,7 @@ def canonical_query_string(time_now:)
9693 "X-Amz-Credential" => @access_key_id + "/" + time_now . strftime ( "%Y%m%d" ) + "/" + @aws_region + "/kafka-cluster/aws4_request" ,
9794 "X-Amz-Date" => time_now . strftime ( "%Y%m%dT%H%M%SZ" ) ,
9895 "X-Amz-Expires" => "900" ,
96+ "X-Amz-Security-Token" => @session_token ,
9997 "X-Amz-SignedHeaders" => "host"
10098 )
10199 end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Kafka
4- VERSION = "1.4.0 "
4+ VERSION = "1.4.4 "
55end
You can’t perform that action at this time.
0 commit comments