go-tell/internal/web/mapping/auth.go
Daniel Noulet b50c054b30 Initialize CMS application scaffold
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-19 14:17:27 +02:00

15 lines
393 B
Go

package mapping
import "github.com/example/cms/internal/identity"
type LoginRequest struct{ Subject, Email, Name string }
func (r LoginRequest) Identity() identity.Identity {
return identity.Identity{Subject: r.Subject, Email: r.Email, Name: r.Name}
}
type LoginResponse struct {
Token string `json:"token"`
User any `json:"user,omitempty"`
Admin any `json:"admin,omitempty"`
}