auth_identity

package
v0.0.0-...-72ef1ab Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 6 Imported by: 111

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthIdentity

type AuthIdentity struct {
	gorm.Model
	Basic
	SignLogs
}

AuthIdentity auth identity session model

type Basic

type Basic struct {
	Provider          string // phone, email, wechat, github...
	UID               string `gorm:"column:uid"`
	EncryptedPassword string
	UserID            string
	ConfirmedAt       *time.Time
}

Basic basic information about auth identity

func (Basic) ToClaims

func (basic Basic) ToClaims() *claims.Claims

ToClaims convert to auth Claims

type SignLog

type SignLog struct {
	UserAgent string
	At        *time.Time
	IP        string
}

SignLog sign log

type SignLogs

type SignLogs struct {
	Log         string `sql:"-"`
	SignInCount uint
	Logs        []SignLog
}

SignLogs record sign in logs

func (*SignLogs) Scan

func (signLogs *SignLogs) Scan(data interface{}) (err error)

Scan scan data into sign logs

func (SignLogs) Value

func (signLogs SignLogs) Value() (driver.Value, error)

Value return struct's Value

Jump to

Keyboard shortcuts

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