pub struct PublicKey {
pub id: Url,
pub owner: Url,
pub public_key_pem: String,
}Expand description
W3C Security v1 publicKey block.
Mastodon, Pleroma, Misskey, Lemmy and every other Cavage-era implementation expose actors with this exact shape:
"publicKey": {
"id": "https://example.com/users/alice#main-key",
"owner": "https://example.com/users/alice",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIB…"
}The PEM payload is an X.509 SubjectPublicKeyInfo (PKIX) document and
is the canonical way to publish an actor’s RSA-2048 (or, more
recently, Ed25519) verification key for HTTP Signatures. Modern FEP
implementations additionally publish Multikey
entries via assertionMethod, but publicKey remains the
must-have legacy field.
Fields§
§id: UrlGlobally unique identifier for this key, typically the actor URL
suffixed with a #fragment (e.g. #main-key).
owner: UrlThe actor that owns and rotates this key. MUST equal the actor’s
id for the receiver to accept signatures made with it.
public_key_pem: StringPKIX SubjectPublicKeyInfo PEM, including the
-----BEGIN PUBLIC KEY----- armour.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
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>,
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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> 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
key and return true if they are equal.