pub enum Authentication {
Ok,
CleartextPassword,
Md5Password(AuthenticationMd5Password),
Sasl(AuthenticationSasl),
SaslContinue(AuthenticationSaslContinue),
SaslFinal(AuthenticationSaslFinal),
}
postgres
only.Variants§
Ok
The authentication exchange is successfully completed.
CleartextPassword
The frontend must now send a [PasswordMessage] containing the password in clear-text form.
Md5Password(AuthenticationMd5Password)
The frontend must now send a [PasswordMessage] containing the password (with user name) encrypted via MD5, then encrypted again using the 4-byte random salt.
Sasl(AuthenticationSasl)
The frontend must now initiate a SASL negotiation, using one of the SASL mechanisms listed in the message.
The frontend will send a [SaslInitialResponse] with the name of the selected mechanism, and the first part of the SASL data stream in response to this.
If further messages are needed, the server will respond with Authentication::SaslContinue.
SaslContinue(AuthenticationSaslContinue)
This message contains challenge data from the previous step of SASL negotiation.
The frontend must respond with a [SaslResponse] message.
SaslFinal(AuthenticationSaslFinal)
SASL authentication has completed with additional mechanism-specific data for the client.
The server will next send Authentication::Ok to indicate successful authentication.
Trait Implementations§
Source§impl Debug for Authentication
impl Debug for Authentication
Auto Trait Implementations§
impl !Freeze for Authentication
impl RefUnwindSafe for Authentication
impl Send for Authentication
impl Sync for Authentication
impl Unpin for Authentication
impl UnwindSafe for Authentication
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more