1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.db.protocol.postgresql.packet.handshake.authentication;
19
20 import org.apache.shardingsphere.db.protocol.postgresql.packet.identifier.PostgreSQLIdentifierPacket;
21 import org.apache.shardingsphere.db.protocol.postgresql.packet.identifier.PostgreSQLIdentifierTag;
22 import org.apache.shardingsphere.db.protocol.postgresql.packet.identifier.PostgreSQLMessagePacketType;
23 import org.apache.shardingsphere.db.protocol.postgresql.payload.PostgreSQLPacketPayload;
24
25
26
27
28 public final class PostgreSQLPasswordAuthenticationPacket extends PostgreSQLIdentifierPacket {
29
30 private static final int AUTH_REQ_PASSWORD = 3;
31
32 @Override
33 protected void write(final PostgreSQLPacketPayload payload) {
34 payload.writeInt4(AUTH_REQ_PASSWORD);
35 }
36
37 @Override
38 public PostgreSQLIdentifierTag getIdentifier() {
39 return PostgreSQLMessagePacketType.AUTHENTICATION_REQUEST;
40 }
41 }