Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSessionsMismatch = errors.New("the old and new session do not match")
)
Functions ¶
This section is empty.
Types ¶
type SessionData ¶
type SessionData struct {
Subject string
AccessToken string
RefreshToken string
IDToken string
ExpiresAt time.Time
}
func (SessionData) IsExpired ¶
func (d SessionData) IsExpired() bool
type SessionImpl ¶
type SessionImpl interface {
CloseConnection(ctx context.Context) error
Add(context.Context, SessionData) (string, error)
Delete(context.Context, string) error
Get(context.Context, string) (SessionData, error)
Update(context.Context, string, SessionData) error
Purge(ctx context.Context) error
}
func NewPostgresqlSessionImpl ¶
func NewPostgresqlSessionImpl(ctx context.Context, cipher encryption.HexCipher, host, database, username, password string) (SessionImpl, error)
func NewSQLiteSessionImpl ¶
func NewSQLiteSessionImpl(_ context.Context, cipher encryption.HexCipher, database string) (SessionImpl, error)
Click to show internal directories.
Click to hide internal directories.