Skip to content

Commit 382acb7

Browse files
author
Tatai Marton
committed
Authentication: Add cleartext authentication
1 parent 9772369 commit 382acb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/github/pgasync/impl/io/AuthenticationDecoder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class AuthenticationDecoder implements Decoder<Authentication> {
4747

4848
static final int OK = 0;
4949
static final int PASSWORD_MD5_CHALLENGE = 5;
50+
static final int CLEARTEXT_PASSWORD = 3;
5051

5152
@Override
5253
public byte getMessageId() {
@@ -59,6 +60,8 @@ public Authentication read(ByteBuffer buffer) {
5960
switch (type) {
6061
case OK:
6162
return new Authentication(true, null);
63+
case CLEARTEXT_PASSWORD:
64+
return new Authentication(false, null);
6265
case PASSWORD_MD5_CHALLENGE:
6366
byte[] salt = new byte[4];
6467
buffer.get(salt);

0 commit comments

Comments
 (0)