Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ably/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def extra_auth_headers
# spec - RSA7e
# @return string
def client_id_for_request
options[:client_id] if options[:client_id] && using_basic_auth?
options[:client_id]
end

# Auth params used in URI endpoint for Realtime connections
Expand Down
3 changes: 1 addition & 2 deletions spec/acceptance/realtime/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@
context 'and an explicit client_id in ClientOptions' do
let(:client_id) { random_str }

# Skipped because more clarification needed on RSA7e, see https://github.com/ably/ably-ruby/issues/425
xit 'allows uses the explicit client_id in the connection' do
it 'allows uses the explicit client_id in the connection' do
connection.__incoming_protocol_msgbus__.subscribe(:protocol_message) do |protocol_message|
if protocol_message.action == :connected
expect(protocol_message.connection_details.client_id).to eql(client_id)
Expand Down
5 changes: 2 additions & 3 deletions spec/acceptance/realtime/connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,11 @@ def publish_and_check_disconnect(options = {})
let(:client_id) { random_str }
let(:client_options) { default_options.merge(client_id: 'incompatible', token: token_string, key: nil, log_level: :none) }

# Skipped because more clarification needed on RSA7e, see https://github.com/ably/ably-ruby/issues/425
xit 'fails the connection' do
it 'fails the connection' do
expect(client.client_id).to eql('incompatible')
client.connection.once(:failed) do
expect(client.client_id).to eql('incompatible')
expect(client.connection.error_reason.code).to eql(40101) # Invalid clientId for credentials
expect(client.connection.error_reason.code).to eql(40102) # Incompatible clientId for credentials
stop_reactor
end
end
Expand Down