From bb4b71f0abe7e17d58d1d10562fb7fd70a66f351 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 25 Jun 2024 16:13:01 +0530 Subject: [PATCH] Fixed naming convention for client_id_header as per review comment --- lib/ably/auth.rb | 4 ++-- lib/ably/realtime/auth.rb | 2 +- lib/ably/realtime/connection.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ably/auth.rb b/lib/ably/auth.rb index 071d7178..1fc3f0e3 100644 --- a/lib/ably/auth.rb +++ b/lib/ably/auth.rb @@ -413,9 +413,9 @@ def auth_header # Extra headers that may be used during authentication # spec - RSA7e # @return [Hash] headers - def client_id_header(realtime=false) + def client_id_header(realtime_params=false) if options[:client_id] && using_basic_auth? - if realtime + if realtime_params { 'clientId' => options[:client_id] } else { 'X-Ably-ClientId' => Base64.urlsafe_encode64(options[:client_id]) } diff --git a/lib/ably/realtime/auth.rb b/lib/ably/realtime/auth.rb index c73b2635..b36ab9c2 100644 --- a/lib/ably/realtime/auth.rb +++ b/lib/ably/realtime/auth.rb @@ -226,7 +226,7 @@ def auth_header_sync auth_sync.auth_header end - def client_id_header_sync + def client_id_params_sync auth_sync.client_id_header(true) end diff --git a/lib/ably/realtime/connection.rb b/lib/ably/realtime/connection.rb index 185d6065..3d5fc31b 100644 --- a/lib/ably/realtime/connection.rb +++ b/lib/ably/realtime/connection.rb @@ -470,7 +470,7 @@ def create_websocket_transport 'false' end - url_params.merge!(client.auth.client_id_header_sync) # RSA7e1 + url_params.merge!(client.auth.client_id_params_sync) # RSA7e1 url_params.merge!(client.transport_params) if !key.nil_or_empty? and connection_state_available?