Versions in this module Expand all Collapse all v0 v0.0.2 Feb 19, 2025 v0.0.1 Feb 19, 2025 Changes in this version + const CtxSessionKey + func CheckLoginMiddleware() gin.HandlerFunc + func RenewAccessToken(ctx *gctx.Context) error + func SetDefaultProvider(sp Provider) + func UpdateClaims(ctx *gctx.Context, claims Claims) error + type Builder struct + func NewSessionBuilder(ctx *gctx.Context, uid int64) *Builder + func (b *Builder) Build() (Session, error) + func (b *Builder) SetJwtData(data map[string]string) *Builder + func (b *Builder) SetProvider(p Provider) *Builder + func (b *Builder) SetSessData(data map[string]any) *Builder + type Claims struct + Data map[string]string + Expiration int64 + SSID string + Uid int64 + func (c Claims) Get(key string) ekit.AnyValue + type MemorySession struct + func NewMemorySession(cl Claims) *MemorySession + func (m *MemorySession) Claims() Claims + func (m *MemorySession) Del(ctx context.Context, key string) error + func (m *MemorySession) Destroy(ctx context.Context) error + func (m *MemorySession) Get(ctx context.Context, key string) ekit.AnyValue + func (m *MemorySession) Set(ctx context.Context, key string, val any) error + func (m *MemorySession) UpdateClaims(ctx *gctx.Context, claims Claims) error + type MiddlewareBuilder struct + Threshold time.Duration + func (b *MiddlewareBuilder) Build() gin.HandlerFunc + type Provider interface + Destroy func(ctx *gctx.Context) error + Get func(ctx *gctx.Context) (Session, error) + NewSession func(ctx *gctx.Context, uid int64, jwtData map[string]string, ...) (Session, error) + RenewAccessToken func(ctx *gctx.Context) error + UpdateClaims func(ctx *gctx.Context, claims Claims) error + func DefaultProvider() Provider + type Session interface + Claims func() Claims + Del func(ctx context.Context, key string) error + Destroy func(ctx context.Context) error + Get func(ctx context.Context, key string) ekit.AnyValue + Set func(ctx context.Context, key string, val any) error + func Get(ctx *gctx.Context) (Session, error) + func NewSession(ctx *gctx.Context, uid int64, jwtData map[string]string, ...) (Session, error) + type TokenCarrier interface + Clear func(ctx *gctx.Context) + Extract func(ctx *gctx.Context) string + Inject func(ctx *gctx.Context, value string)