session: add OwnerID to a private token storage key

This commit is contained in:
Leonard Lyubich 2020-05-08 13:20:12 +03:00
parent 3b13da0fef
commit af73d958a1
5 changed files with 69 additions and 18 deletions

View file

@ -43,3 +43,13 @@ func (t *pToken) PublicKey() []byte {
func (t *pToken) Expired(epoch uint64) bool {
return t.validUntil < epoch
}
// SetOwnerID is an owner ID field setter.
func (s *PrivateTokenKey) SetOwnerID(id OwnerID) {
s.owner = id
}
// SetTokenID is a token ID field setter.
func (s *PrivateTokenKey) SetTokenID(id TokenID) {
s.token = id
}