Class PasswordMessage (0.26.0)

publicclass PasswordMessageextendsControlMessage

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

protectedstaticfinalcharIDENTIFIER
Field Value
Type Description
char

Constructors

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

publicPasswordMessage(ConnectionHandlerconnection,Map<String,String>parameters)
Parameters
Name Description
connection ConnectionHandler
parameters Map<String,String>

Methods

getIdentifier()

protectedStringgetIdentifier()

Used for logging.

Returns
Type Description
String
Overrides

getMessageName()

protectedStringgetMessageName()

Used for logging.

Returns
Type Description
String
Overrides

getPassword()

publicStringgetPassword()
Returns
Type Description
String

getPayloadString()

protectedStringgetPayloadString()

Used for logging.

Returns
Type Description
String
Overrides

getUsername()

publicStringgetUsername()
Returns
Type Description
String

sendPayload()

protectedvoidsendPayload()

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

Overrides
Exceptions
Type Description
Exception

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.