Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionManager ¶
type SessionManager interface {
Create(ctx context.Context, identity auth.Identity) (auth.Session, error)
Validate(ctx context.Context, token string) (auth.Session, error)
Revoke(ctx context.Context, token string) error
}
SessionManager manages session lifecycle after authentication. Implementations decide how tokens are generated and where state is stored.
Strategy examples:
- Server-side session: crypto-random token stored in Redis.
- JWT: signed token with claims; Validate decodes without server state.
- Access+refresh: dual tokens with separate lifetimes.
func NewServerSessionManager ¶
func NewServerSessionManager( tracer observability.Tracer, meter observability.Meter, sessionRepo repokvstore.SessionRepository, ttl time.Duration, ) SessionManager
NewServerSessionManager creates a server-side session manager.
Click to show internal directories.
Click to hide internal directories.