Class PasswordMessage (0.27.0)

public class PasswordMessage extends ControlMessage

PGAdapter will convert a password message into gRPC authentication in the following ways:

  1. If the username is 'oauth2' the password will be interpreted as an OAuth2 token.
  2. If the username is an email address and the password contains private key section, PGAdapter will construct a service account from the email address and private key.
  3. Otherwise, PGAdapter will try to construct a Google credentials instance from the string in the password message. The username will be ignored.

Inheritance

java.lang.Object > WireMessage > ControlMessage > PasswordMessage

Static Fields

IDENTIFIER

protected static final char IDENTIFIER
Field Value
TypeDescription
char

Constructors

PasswordMessage(ConnectionHandler connection, Map<String,String> parameters)

public PasswordMessage(ConnectionHandler connection, Map<String,String> parameters)
Parameters
NameDescription
connectionConnectionHandler
parametersMap<String,String>

Methods

getIdentifier()

public String getIdentifier()

Used for logging.

Returns
TypeDescription
String
Overrides

getMessageName()

protected String getMessageName()

Used for logging.

Returns
TypeDescription
String
Overrides

getPassword()

public String getPassword()
Returns
TypeDescription
String

getPayloadString()

protected String getPayloadString()

Used for logging.

Returns
TypeDescription
String
Overrides

getUsername()

public String getUsername()
Returns
TypeDescription
String

sendPayload()

protected void sendPayload()

Override this method to include post-processing and metadata in the sending process. Template method for send.

Overrides
Exceptions
TypeDescription
Exception