session: Add public key to the constructor of new private token

Private token based on the token with private key. Therefore
it must inherit public key field through constructor parameter.
This commit is contained in:
alexvanin 2020-01-17 14:56:51 +03:00
parent e945525510
commit 01b910fd31
3 changed files with 13 additions and 2 deletions

View file

@ -54,6 +54,7 @@ func (s *simpleStore) New(p TokenParams) *PToken {
LastEpoch: p.LastEpoch,
ObjectID: p.ObjectID,
OwnerID: p.OwnerID,
PublicKeys: p.PublicKeys,
},
PrivateKey: key,
}