lib/tikkie/api/authentication.rb in tikkie-api-0.2.1 vs lib/tikkie/api/authentication.rb in tikkie-api-0.2.2
- old
+ new
@@ -51,10 +51,15 @@
iss: "Ruby Tikkie client",
sub: @config.api_key,
aud: @config.oauth_token_url
}
- JWT.encode(payload, @config.private_data, @config.jwt_hashing_algorithm, typ: "JWT")
+ # Send header typ as String, not symbol (JWT version 1.x adds "typ" as String by default).
+ headers = {
+ "typ" => "JWT"
+ }
+
+ JWT.encode(payload, @config.private_data, @config.jwt_hashing_algorithm, headers)
end
end
end
end