types

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-or-later

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Sub     string `json:"sub"`               // Unique identifier (OAuth sub claim or email for MagicLink)
	Email   string `json:"email"`             // User's email address
	Name    string `json:"name"`              // Display name (optional)
	Picture string `json:"picture,omitempty"` // Avatar URL from OAuth provider (optional)
}

User represents an authenticated user across all layers of the application. This is the canonical user representation used by auth providers, domain models, and API handlers.

func (*User) IsValid

func (u *User) IsValid() bool

IsValid returns true if the user has required fields populated.

func (*User) NormalizedEmail

func (u *User) NormalizedEmail() string

NormalizedEmail returns the email in lowercase for comparison.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL