pub trait AuthProvider:
Send
+ Sync
+ Debug {
// Required methods
fn method(&self) -> &str;
fn initial(&self) -> Result<Bytes, AuthError>;
// Provided method
fn respond_to_challenge(
&self,
_challenge: &[u8],
) -> Result<Bytes, AuthError> { ... }
}Expand description
Synchronous, sans-io authentication provider.
Concrete impls live in:
Required Methods§
Provided Methods§
Sourcefn respond_to_challenge(&self, _challenge: &[u8]) -> Result<Bytes, AuthError>
fn respond_to_challenge(&self, _challenge: &[u8]) -> Result<Bytes, AuthError>
Bytes to populate in the CommandAuthResponse after the broker issued a
CommandAuthChallenge.
The default implementation simply re-invokes AuthProvider::initial, matching the
“refresh-and-resend” semantics of the Pulsar Java client. Providers that participate in a
real multi-step handshake (SASL, GSSAPI) override this to consume the server challenge.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".