This website works better with JavaScript.
Home
Explore
Help
Sign In
writeas
/
web-core
mirror of
https://github.com/writeas/web-core
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
0
Activity
Browse Source
Add support for including a public key on a Person
master
Matt Baer
5 years ago
parent
d16108618b
commit
b5d7dbe3a3
1 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
activitystreams/person.go
+ 9
- 0
activitystreams/person.go
View 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),
}
}
Write
Preview
Loading…
Cancel
Save