authentication

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Id               string           `postgres:"id,primarykey,type:uuid,default:gen_random_uuid()"`
	Account          *account.Account `postgres:"account,ondelete:CASCADE"`
	IdTokenHash      []byte           `postgres:"id_token_hash,unique,nullable"`
	DbscPublicKey    []byte           `postgres:"dbsc_public_key,nullable"`
	CreatedAt        *time.Time       `postgres:"created_at"`
	ExpiresAt        *time.Time       `postgres:"expires_at"`
	Ended            bool             `postgres:"ended,default:false"`
	EndedAt          *time.Time       `postgres:"ended_at,nullable"`
	IpAddress        string           `postgres:"ip_address,type:inet,nullable"`
	IpAddressCountry string           `postgres:"ip_address_country,nullable"`
	IpAddressCity    string           `postgres:"ip_address_city,nullable"`
	UserAgent        string           `postgres:"user_agent,nullable"`
}

type ClientMetadata

type ClientMetadata struct {
	IpAddress        string
	IpAddressCountry string
	IpAddressCity    string
	UserAgent        string
}

ClientMetadata holds request-derived client information persisted alongside an authentication. It is extracted from the HTTP context (see the session manager) and passed to InsertAuthentication.

Jump to

Keyboard shortcuts

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