Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenID ¶
NewTokenID generates new ID for a token based on UUID.
Types ¶
type PrivateToken ¶
type PrivateToken struct {
// contains filtered or unexported fields
}
PrivateToken represents private session info.
func NewPrivateToken ¶
func NewPrivateToken(sk *ecdsa.PrivateKey, exp uint64) *PrivateToken
NewPrivateToken returns new private token based on the passed values.
func (*PrivateToken) ExpiredAt ¶
func (t *PrivateToken) ExpiredAt() uint64
ExpiredAt returns epoch number until token is valid.
func (*PrivateToken) SessionKey ¶
func (t *PrivateToken) SessionKey() *ecdsa.PrivateKey
SessionKey returns the private session key.
Click to show internal directories.
Click to hide internal directories.