Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("private token not found")
Functions ¶
This section is empty.
Types ¶
type PrivateToken ¶
type PrivateToken struct {
// contains filtered or unexported fields
}
PrivateToken represents private session info.
func (*PrivateToken) ExpiredAt ¶ added in v0.26.1
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.
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func New ¶
func New() *TokenStore
New creates, initializes and returns a new TokenStore instance.
The elements of the instance are stored in the map.
func (*TokenStore) Create ¶
func (s *TokenStore) Create(ctx context.Context, body *session.CreateRequestBody) (*session.CreateResponseBody, error)
func (*TokenStore) Get ¶
func (s *TokenStore) Get(ownerID *owner.ID, tokenID []byte) *PrivateToken
Get returns private token corresponding to the given identifiers.
Returns nil is there is no element in storage.
Click to show internal directories.
Click to hide internal directories.