Sfoglia il codice sorgente

Add support for including a public key on a Person

master
Matt Baer 5 anni fa
parent
commit
b5d7dbe3a3
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      activitystreams/person.go

+ 9
- 0
activitystreams/person.go Vedi File

@@ -32,3 +32,12 @@ func NewPerson(accountRoot string) *Person {

return &p
}

func (p *Person) AddPubKey(k []byte) {
p.Context = append(p.Context, "https://w3id.org/security/v1")
p.PublicKey = PublicKey{
ID: p.ID + "#main-key",
Owner: p.ID,
PublicKeyPEM: string(k),
}
}

Caricamento…
Annulla
Salva