pub struct KeyAttestationRequest {
pub request_version: String,
pub controller: String,
pub identity: IdentityDescriptor,
pub algorithm: String,
pub public_key_jwk: Jwk,
pub pop: String,
pub requested_ttl_seconds: Option<u32>,
}Expand description
The body of POST /key-attestations (§5.1). Closed. Debug never
prints the token.
Fields§
§request_version: StringAlways REQUEST_VERSION.
controller: StringThe controller’s did:web DID.
identity: IdentityDescriptorThe identity descriptor with the token as proof.
algorithm: Stringed25519 or ecdsa-p256.
public_key_jwk: JwkThe ephemeral public key.
pop: StringBase64 signature by the ephemeral key over pop_preimage.
requested_ttl_seconds: Option<u32>The window length asked for, 1 to 3600 seconds (default 600).
Implementations§
Source§impl KeyAttestationRequest
impl KeyAttestationRequest
Sourcepub fn validate(&self) -> Result<(), AcdpError>
pub fn validate(&self) -> Result<(), AcdpError>
§5.2 step 1: the closed schema plus its patterns. A did:key
controller and an X509-SVID are schema_violation.
Sourcepub fn token_hash(&self) -> String
pub fn token_hash(&self) -> String
sha256: + hex SHA-256 of the token.
Trait Implementations§
Source§impl Clone for KeyAttestationRequest
impl Clone for KeyAttestationRequest
Source§impl Debug for KeyAttestationRequest
impl Debug for KeyAttestationRequest
Source§impl<'de> Deserialize<'de> for KeyAttestationRequest
impl<'de> Deserialize<'de> for KeyAttestationRequest
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
impl Eq for KeyAttestationRequest
Source§impl PartialEq for KeyAttestationRequest
impl PartialEq for KeyAttestationRequest
Source§impl Serialize for KeyAttestationRequest
impl Serialize for KeyAttestationRequest
impl StructuralPartialEq for KeyAttestationRequest
Auto Trait Implementations§
impl Freeze for KeyAttestationRequest
impl RefUnwindSafe for KeyAttestationRequest
impl Send for KeyAttestationRequest
impl Sync for KeyAttestationRequest
impl Unpin for KeyAttestationRequest
impl UnsafeUnpin for KeyAttestationRequest
impl UnwindSafe for KeyAttestationRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.