Struct postgres_protocol::authentication::sasl::ScramSha256 [−][src]
pub struct ScramSha256 { /* fields omitted */ }Expand description
A type which handles the client side of the SCRAM-SHA-256/SCRAM-SHA-256-PLUS authentication process.
During the authentication process, if the backend sends an AuthenticationSASL message which
includes SCRAM-SHA-256 as an authentication mechanism, this type can be used.
After a ScramSha256 is constructed, the buffer returned by the message() method should be
sent to the backend in a SASLInitialResponse message along with the mechanism name.
The server will reply with an AuthenticationSASLContinue message. Its contents should be
passed to the update() method, after which the buffer returned by the message() method
should be sent to the backend in a SASLResponse message.
The server will reply with an AuthenticationSASLFinal message. Its contents should be passed
to the finish() method, after which the authentication process is complete.
Implementations
Constructs a new instance which will use the provided password for authentication.
Returns the message which should be sent to the backend in an SASLResponse message.
Updates the state machine with the response from the backend.
This should be called when an AuthenticationSASLContinue message is received.