diff --git a/imap-types/src/auth.rs b/imap-types/src/auth.rs index fe21f455..02ac91b5 100644 --- a/imap-types/src/auth.rs +++ b/imap-types/src/auth.rs @@ -71,6 +71,9 @@ pub enum AuthMechanism<'a> { /// * XOAuth2, + // + // --- SHA-1 --- + // /// SCRAM-SHA-1 /// /// # Reference(s): @@ -85,6 +88,9 @@ pub enum AuthMechanism<'a> { /// * https://datatracker.ietf.org/doc/html/rfc5802 ScramSha1Plus, + // + // --- SHA-2 --- + // /// SCRAM-SHA-256 /// /// # Reference(s): @@ -99,6 +105,23 @@ pub enum AuthMechanism<'a> { /// * https://datatracker.ietf.org/doc/html/rfc7677 ScramSha256Plus, + // + // --- SHA-3 --- + // + /// SCRAM-SHA3-512 + /// + /// # Reference(s): + /// + /// * https://datatracker.ietf.org/doc/html/draft-melnikov-scram-sha3-512 + ScramSha3_512, + + /// SCRAM-SHA3-512-PLUS + /// + /// # Reference(s): + /// + /// * https://datatracker.ietf.org/doc/html/draft-melnikov-scram-sha3-512 + ScramSha3_512Plus, + /// Some other (unknown) mechanism. Other(AuthMechanismOther<'a>), } @@ -140,6 +163,8 @@ impl<'a> AsRef for AuthMechanism<'a> { Self::ScramSha1Plus => "SCRAM-SHA-1-PLUS", Self::ScramSha256 => "SCRAM-SHA-256", Self::ScramSha256Plus => "SCRAM-SHA-256-PLUS", + Self::ScramSha3_512 => "SCRAM-SHA3-512", + Self::ScramSha3_512Plus => "SCRAM-SHA3-512-PLUS", Self::Other(other) => other.0.as_ref(), } }