Browse Source

Add privateKey on Person

master
Matt Baer 5 years ago
parent
commit
05ac12f10e
2 changed files with 9 additions and 0 deletions
  1. +1
    -0
      activitystreams/data.go
  2. +8
    -0
      activitystreams/person.go

+ 1
- 0
activitystreams/data.go View File

@@ -13,6 +13,7 @@ type (
ID string `json:"id"`
Owner string `json:"owner"`
PublicKeyPEM string `json:"publicKeyPem"`
privateKey []byte
}

Image struct {


+ 8
- 0
activitystreams/person.go View File

@@ -41,3 +41,11 @@ func (p *Person) AddPubKey(k []byte) {
PublicKeyPEM: string(k),
}
}

func (p *Person) SetPrivKey(k []byte) {
p.PublicKey.privateKey = k
}

func (p *Person) GetPrivKey() []byte {
return p.PublicKey.privateKey
}

Loading…
Cancel
Save