#[non_exhaustive]pub struct SignatureHeader {
pub alg: String,
pub kid: Option<String>,
pub jku: Option<String>,
}Expand description
The decoded JWS protected header of an AgentCardSignature.
Spec §8.4.3 step 2 requires a verifying client to “retrieve the public key
using the kid and jku (or from a trusted key store)”. That step is the
caller’s — see verify_agent_card for why — but the caller cannot
perform it without reading those two fields, and they live base64url-encoded
inside AgentCardSignature::protected. signature_header decodes them
so callers do not have to hand-roll base64 and JSON parsing to obey a MUST.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.alg: StringThe JWS algorithm (alg). Only ES256 is verifiable by this module.
kid: Option<String>The key identifier (kid), when the signer supplied one.
jku: Option<String>The JWK Set URL (jku) to retrieve the signing key from, when present.
Spec §8.4.3 says public keys SHOULD be retrieved over secure
channels; treat a non-HTTPS jku, or one pointing outside the agent’s
own origin, as untrusted.
Trait Implementations§
Source§impl Clone for SignatureHeader
impl Clone for SignatureHeader
Source§fn clone(&self) -> SignatureHeader
fn clone(&self) -> SignatureHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignatureHeader
impl Debug for SignatureHeader
impl Eq for SignatureHeader
Source§impl PartialEq for SignatureHeader
impl PartialEq for SignatureHeader
impl StructuralPartialEq for SignatureHeader
Auto Trait Implementations§
impl Freeze for SignatureHeader
impl RefUnwindSafe for SignatureHeader
impl Send for SignatureHeader
impl Sync for SignatureHeader
impl Unpin for SignatureHeader
impl UnsafeUnpin for SignatureHeader
impl UnwindSafe for SignatureHeader
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request