Add support for including a public key on a Person
This commit is contained in:
@@ -32,3 +32,12 @@ func NewPerson(accountRoot string) *Person {
|
|||||||
|
|
||||||
return &p
|
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),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user