auth_identity

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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