pub struct PasswordProtocolExtensionBuilder {
pub users: HashMap<String, String>,
pub username: String,
pub password: String,
}
Expand description
Password protocol extension builder.
Passwords are sent in plain text!!
Fields§
§users: HashMap<String, String>
Map of users and their passwords to allow. Only used on server.
username: String
Username to authenticate with. Only used on client.
password: String
Password to authenticate with. Only used on client.
Implementations§
Source§impl PasswordProtocolExtensionBuilder
impl PasswordProtocolExtensionBuilder
Sourcepub fn new_server(users: HashMap<String, String>) -> Self
pub fn new_server(users: HashMap<String, String>) -> Self
Create a new password protocol extension builder for the server, with a map of users and passwords to allow.
Sourcepub fn new_client(username: String, password: String) -> Self
pub fn new_client(username: String, password: String) -> Self
Create a new password protocol extension builder for the client, with a username and password to authenticate with.
Trait Implementations§
Source§impl ProtocolExtensionBuilder for PasswordProtocolExtensionBuilder
impl ProtocolExtensionBuilder for PasswordProtocolExtensionBuilder
Source§fn build_from_bytes(
&self,
payload: Bytes,
role: Role,
) -> Result<AnyProtocolExtension, WispError>
fn build_from_bytes( &self, payload: Bytes, role: Role, ) -> Result<AnyProtocolExtension, WispError>
Build a protocol extension from the extension’s metadata.
Source§fn build_to_extension(&self, role: Role) -> AnyProtocolExtension
fn build_to_extension(&self, role: Role) -> AnyProtocolExtension
Build a protocol extension to send to the other side.
Auto Trait Implementations§
impl Freeze for PasswordProtocolExtensionBuilder
impl RefUnwindSafe for PasswordProtocolExtensionBuilder
impl Send for PasswordProtocolExtensionBuilder
impl Sync for PasswordProtocolExtensionBuilder
impl Unpin for PasswordProtocolExtensionBuilder
impl UnwindSafe for PasswordProtocolExtensionBuilder
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
Mutably borrows from an owned value. Read more