pub struct ProofClaims {
pub aud: String,
pub exp: u64,
pub iat: u64,
pub request_id: RequestId,
pub nonce: Option<Vec<u8>>,
pub credential_hash: Option<CredentialHash>,
pub capnp_schema_id: u64,
pub capnp_body_bytes: Vec<u8>,
pub response_binding: Option<ResponseBinding>,
pub federate_recipient_binding: Option<FederateRecipientBinding>,
}Expand description
Decoded proof-CWT claims set.
Fields§
§aud: StringCanonical service domain (CWT aud).
exp: u64Proof expiry, integer Unix seconds (CWT exp).
iat: u64Proof issuance, integer Unix seconds (CWT iat).
request_id: RequestId128-bit request identifier (CWT cti).
nonce: Option<Vec<u8>>Server challenge (CWT Nonce, RFC 9711). Present exactly when the
profile requires a challenge.
credential_hash: Option<CredentialHash>SHA-256 of the exact credential bytes, or None when no credential is
presented (encoded as CBOR null).
capnp_schema_id: u64Cap’n Proto 64-bit root type ID of the signed body.
capnp_body_bytes: Vec<u8>Exact Cap’n Proto body bytes (capnp_body_bytes, claim −70003 — the one
neutral name used for both request and response proof bodies).
response_binding: Option<ResponseBinding>Response binding map, or None when unbound (encoded as CBOR null).
federate_recipient_binding: Option<FederateRecipientBinding>Optional deferred-Federate source extension binding all forwarded response recipients (claim −70009). Generic proof-v1 paths reject it.
Implementations§
Source§impl ProofClaims
impl ProofClaims
Sourcepub fn decode(payload: &[u8]) -> Result<Self>
pub fn decode(payload: &[u8]) -> Result<Self>
Decode a claims payload from a CBOR byte string.
Enforces:
- RFC 8949 core deterministic encoding (no indefinite lengths, no non-minimal integers, no tags, no floating-point values, sorted unique map keys).
- Closed claim set: unknown claim keys deny.
- Every listed claim is present (absent claims deny).
- Proof-v1 size caps on
aud, body bytes, challenge.
Trait Implementations§
Source§impl Clone for ProofClaims
impl Clone for ProofClaims
Source§fn clone(&self) -> ProofClaims
fn clone(&self) -> ProofClaims
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProofClaims
impl RefUnwindSafe for ProofClaims
impl Send for ProofClaims
impl Sync for ProofClaims
impl Unpin for ProofClaims
impl UnsafeUnpin for ProofClaims
impl UnwindSafe for ProofClaims
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more