Skip to content

Commit

Permalink
Fixed naming convention for client_id_header as per review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jun 25, 2024
1 parent f4d7f2b commit bb4b71f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ably/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]) }
Expand Down
2 changes: 1 addition & 1 deletion lib/ably/realtime/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ably/realtime/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit bb4b71f

Please sign in to comment.