pub trait CredentialPayload {
// Required methods
fn credential(&self) -> &NonceCredential;
fn auth_payload(&self, node_id: &str) -> String;
// Provided method
fn body_digest(&self) -> String { ... }
}Expand description
请求体需要提供认证载荷与凭证
Required Methods§
fn credential(&self) -> &NonceCredential
fn auth_payload(&self, node_id: &str) -> String
Provided Methods§
Sourcefn body_digest(&self) -> String
fn body_digest(&self) -> String
Digest of the request body (excluding the credential field) for mutable
operations. Appended to auth_payload as {op}:{node_id}:{subject}:{digest}
so the signature binds the security-critical body fields (e.g. realm secret
hashes) against in-transit tampering. Returns empty for read-only ops, which
have no mutable body beyond what auth_payload already binds.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".