pub struct SagaHttpSignedMessage<'a> { /* private fields */ }Expand description
业务作用:封装接收端实际观察到的签名字段,保证验签与 replay claim 消费同一份字节。
Implementations§
Source§impl<'a> SagaHttpSignedMessage<'a>
impl<'a> SagaHttpSignedMessage<'a>
Sourcepub fn new(
producer: &'a ServiceIdentity,
path: &'a str,
timestamp_ms: u64,
nonce: &'a str,
body: &'a [u8],
signature: &'a str,
) -> Self
pub fn new( producer: &'a ServiceIdentity, path: &'a str, timestamp_ms: u64, nonce: &'a str, body: &'a [u8], signature: &'a str, ) -> Self
业务作用:冻结一条待认证 HTTP 请求的 producer、route、时钟、nonce、body 与 HMAC。
参数说明:
producer: transport 凭据映射出的逻辑 producer。path: 实际命中的固定 path。timestamp_ms: 请求签名时间。nonce: 请求的一次性随机数。body: 收到的原始 body。signature: 请求携带的 HMAC。
返回:只借用原始字段的不可变收据;编码与密码学检查由认证器执行。
Auto Trait Implementations§
impl<'a> Forget for SagaHttpSignedMessage<'a>
impl<'a> Freeze for SagaHttpSignedMessage<'a>
impl<'a> Move for SagaHttpSignedMessage<'a>
impl<'a> RefUnwindSafe for SagaHttpSignedMessage<'a>
impl<'a> Send for SagaHttpSignedMessage<'a>
impl<'a> Sync for SagaHttpSignedMessage<'a>
impl<'a> Unpin for SagaHttpSignedMessage<'a>
impl<'a> UnsafeUnpin for SagaHttpSignedMessage<'a>
impl<'a> UnwindSafe for SagaHttpSignedMessage<'a>
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