Implement Session service executor that generates private token and stores it to map. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
17 lines
293 B
Go
17 lines
293 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
|
|
}
|