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.
This commit is contained in:
2026-04-18 17:37:19 +02:00
parent 5f282bedc5
commit 4bc6d1bced
14 changed files with 295 additions and 16 deletions
+10
View File
@@ -0,0 +1,10 @@
package infra
// OAuthTokens contiene los tokens obtenidos de un flujo OAuth2.
// ExpiresAt es Unix epoch seconds calculado a partir de expires_in del proveedor.
type OAuthTokens struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
TokenType string `json:"token_type"`
ExpiresAt int64 `json:"expires_at"`
}