Files
fn_registry/functions/infra/session.go
T
egutierrez 1aab74467b feat: tipos auth (JWTClaims, Session, OAuthConfig, OAuthTokens, Permission, Role)
Fase 1 del issue 0010 — tipos base del sistema de auth en dominio infra.
Define las estructuras que usaran jwt_*, session_*, oauth2_* y rbac_*.

Añade dep golang.org/x/crypto/bcrypt para el hashing de passwords.
2026-04-18 17:37:19 +02:00

13 lines
448 B
Go

package infra
// Session representa una sesion de usuario almacenada en SQLite.
// Token es un valor aleatorio opaco (32 bytes hex = 64 chars).
// ExpiresAt y CreatedAt son Unix epoch seconds.
type Session struct {
Token string `json:"token"`
UserID string `json:"user_id"`
ExpiresAt int64 `json:"expires_at"`
CreatedAt int64 `json:"created_at"`
Metadata map[string]any `json:"metadata,omitempty"`
}