frostfs-node/pkg/services/session/storage/types.go
Alex Vanin 2fbdcbdee1 [#943] service/object: Check session token expiration
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-10-27 20:25:25 +03:00

22 lines
410 B
Go

package storage
import (
"crypto/ecdsa"
)
// PrivateToken represents private session info.
type PrivateToken struct {
sessionKey *ecdsa.PrivateKey
exp uint64
}
// SessionKey returns the private session key.
func (t *PrivateToken) SessionKey() *ecdsa.PrivateKey {
return t.sessionKey
}
// ExpiredAt returns epoch number until token is valid.
func (t *PrivateToken) ExpiredAt() uint64 {
return t.exp
}