pub struct DpopProof {
pub body: DpopProofBody,
pub signature: Signature,
}Expand description
A signed DPoP proof ready for transmission.
The signature covers the canonical JSON of body.
Fields§
§body: DpopProofBodyThe proof body that was signed.
signature: SignatureEd25519 signature over canonical_json_bytes(&body).
Implementations§
Source§impl DpopProof
impl DpopProof
Sourcepub fn sign(
body: DpopProofBody,
keypair: &Keypair,
) -> Result<DpopProof, KernelError>
pub fn sign( body: DpopProofBody, keypair: &Keypair, ) -> Result<DpopProof, KernelError>
Sign a proof body with the agent’s Ed25519 keypair.
The keypair must be the one corresponding to body.agent_key.
The signature covers the canonical JSON of the body.
Sourcepub fn sign_with_backend(
body: DpopProofBody,
backend: &dyn SigningBackend,
) -> Result<DpopProof, KernelError>
pub fn sign_with_backend( body: DpopProofBody, backend: &dyn SigningBackend, ) -> Result<DpopProof, KernelError>
Sign a proof body with an arbitrary SigningBackend.
The backend’s public key must equal body.agent_key. Use this entry
point when the agent’s signing identity is served by a FIPS backend
(P-256 / P-384) rather than a historical Ed25519 keypair.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DpopProof
impl<'de> Deserialize<'de> for DpopProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DpopProof
impl RefUnwindSafe for DpopProof
impl Send for DpopProof
impl Sync for DpopProof
impl Unpin for DpopProof
impl UnsafeUnpin for DpopProof
impl UnwindSafe for DpopProof
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