Trait fred::interfaces::AuthInterface
source · pub trait AuthInterface: ClientLike {
// Provided methods
fn auth<S>(
&self,
username: Option<String>,
password: S,
) -> impl Future<Output = RedisResult<()>>
where S: Into<Str> { ... }
fn hello(
&self,
version: RespVersion,
auth: Option<(Str, Str)>,
setname: Option<Str>,
) -> impl Future<Output = RedisResult<()>> { ... }
}Expand description
Functions for authenticating clients.
Provided Methods§
sourcefn auth<S>(
&self,
username: Option<String>,
password: S,
) -> impl Future<Output = RedisResult<()>>where
S: Into<Str>,
fn auth<S>(
&self,
username: Option<String>,
password: S,
) -> impl Future<Output = RedisResult<()>>where
S: Into<Str>,
Request for authentication in a password-protected Redis server. Returns ok if successful.
The client will automatically authenticate with the default user if a password is provided in the associated
RedisConfig when calling connect.
If running against clustered servers this function will authenticate all connections.
sourcefn hello(
&self,
version: RespVersion,
auth: Option<(Str, Str)>,
setname: Option<Str>,
) -> impl Future<Output = RedisResult<()>>
fn hello( &self, version: RespVersion, auth: Option<(Str, Str)>, setname: Option<Str>, ) -> impl Future<Output = RedisResult<()>>
Switch to a different protocol, optionally authenticating in the process.
If running against clustered servers this function will issue the HELLO command to each server concurrently.
Object Safety§
This trait is not object safe.
Implementors§
impl AuthInterface for RedisClient
impl AuthInterface for SentinelClient
impl AuthInterface for SubscriberClient
impl AuthInterface for Transaction
impl<C: AuthInterface> AuthInterface for Pipeline<C>
Available on crate feature
i-server only.impl<C: AuthInterface> AuthInterface for WithOptions<C>
Available on crate feature
i-server only.