You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 19, 2026. It is now read-only.
Don't require caller to know the authentication type of the database when connecting #54
When connecting to a database, the caller must know the type of authentication required and set that in the ConnectionConfiguration as the credential. In my fork, I added a "password" field to the ConnectionConfiguration. If that field is set, it overrides the credential field.
Example change in Connection.swift:
case let response as AuthenticationSASLResponse:
let credential = configuration.password != nil ? .scramSHA256(password: configuration.password!) : configuration.credential
guard case let .scramSHA256(password) = credential else {
log(.warning, "SCRAM-SHA-256 credential required to authenticate")
throw PostgresError.scramSHA256CredentialRequired
}
Similar modifications can be made for md5 and plaintext response cases
Activity