public class PasswordMessage extends ControlMessage
PGAdapter will convert a password message into gRPC authentication in the following ways:
- If the username is 'oauth2' the password will be interpreted as an OAuth2 token.
- 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.
- Otherwise, PGAdapter will try to construct a Google credentials instance from the string in the password message. The username will be ignored.
Static Fields
IDENTIFIER
protected static final char IDENTIFIER
Type | Description |
char |
Constructors
PasswordMessage(ConnectionHandler connection, Map<String,String> parameters)
public PasswordMessage(ConnectionHandler connection, Map<String,String> parameters)
Name | Description |
connection | ConnectionHandler |
parameters | Map<String,String> |
Methods
getIdentifier()
protected String getIdentifier()
Used for logging.
Type | Description |
String |
getMessageName()
protected String getMessageName()
Used for logging.
Type | Description |
String |
getPassword()
public String getPassword()
Type | Description |
String |
getPayloadString()
protected String getPayloadString()
Used for logging.
Type | Description |
String |
getUsername()
public String getUsername()
Type | Description |
String |
sendPayload()
protected void sendPayload()
Override this method to include post-processing and metadata in the sending process. Template method for send.
Type | Description |
Exception |