Simplify the signature of activity_pub::sign::Signer::get_key_id
This commit is contained in:
parent
2621c0304e
commit
7ddad12420
@ -17,7 +17,7 @@ pub fn gen_keypair() -> (Vec<u8>, Vec<u8>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub trait Signer {
|
pub trait Signer {
|
||||||
fn get_key_id(&self, conn: &PgConnection) -> String;
|
fn get_key_id(&self) -> String;
|
||||||
|
|
||||||
/// Sign some data with the signer keypair
|
/// Sign some data with the signer keypair
|
||||||
fn sign(&self, to_sign: String) -> Vec<u8>;
|
fn sign(&self, to_sign: String) -> Vec<u8>;
|
||||||
|
@ -259,7 +259,7 @@ impl APActor for Blog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl sign::Signer for Blog {
|
impl sign::Signer for Blog {
|
||||||
fn get_key_id(&self, _conn: &PgConnection) -> String {
|
fn get_key_id(&self) -> String {
|
||||||
format!("{}#main-key", self.ap_url)
|
format!("{}#main-key", self.ap_url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ impl Inbox for User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Signer for User {
|
impl Signer for User {
|
||||||
fn get_key_id(&self, _conn: &PgConnection) -> String {
|
fn get_key_id(&self) -> String {
|
||||||
format!("{}#main-key", self.ap_url)
|
format!("{}#main-key", self.ap_url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user