Skip to content

Commit a712216

Browse files
committed
Replace references of Saml to Sasl
This was a think-o.
1 parent 74dd9b6 commit a712216

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pq/connection.cr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ module PQ
297297
end
298298
end
299299

300-
struct SamlContext
300+
struct SaslContext
301301
SCRAM_NAME = "SCRAM-SHA-256"
302302
SCRAM_PLUS_NAME = "SCRAM-SHA-256-PLUS"
303303

@@ -359,17 +359,17 @@ module PQ
359359

360360
private def handle_auth_sasl(mechanism_list)
361361
mechs = String.new(mechanism_list).split(Char::ZERO)
362-
cbind = if mechs.includes?(SamlContext::SCRAM_PLUS_NAME)
362+
cbind = if mechs.includes?(SaslContext::SCRAM_PLUS_NAME)
363363
check_auth_method!("scram-sha-256-plus")
364364
true
365-
elsif mechs.includes?(SamlContext::SCRAM_NAME)
365+
elsif mechs.includes?(SaslContext::SCRAM_NAME)
366366
check_auth_method!("scram-sha-256")
367367
false
368368
else
369369
raise ConnectionError.new("no known sasl mechanism in list: #{mechs.join(", ")}")
370370
end
371371

372-
ctx = SamlContext.new(@conninfo.password || "", cbind, soc)
372+
ctx = SaslContext.new(@conninfo.password || "", cbind, soc)
373373

374374
# send client-first-message
375375
write_chr 'p' # SASLInitialResponse

0 commit comments

Comments
 (0)