mytokenrepo

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MytokenEntry

type MytokenEntry struct {
	ID       mtid.MTID
	SeqNo    uint64
	ParentID mtid.MTID `db:"parent_id"`
	Token    *mytoken.Mytoken

	Name string
	IP   string `db:"ip_created"`
	// contains filtered or unexported fields
}

MytokenEntry holds the information of a MytokenEntry as stored in the database

func NewMytokenEntry

func NewMytokenEntry(mt *mytoken.Mytoken, name string, networkData api.ClientMetaData) *MytokenEntry

NewMytokenEntry creates a new MytokenEntry

func (*MytokenEntry) InitRefreshToken

func (mte *MytokenEntry) InitRefreshToken(rt string) error

InitRefreshToken links a refresh token to this MytokenEntry

func (*MytokenEntry) Root

func (mte *MytokenEntry) Root() bool

Root checks if this MytokenEntry is a root token

func (*MytokenEntry) SetRefreshToken

func (mte *MytokenEntry) SetRefreshToken(rtID uint64, key []byte) error

SetRefreshToken updates the refresh token for this MytokenEntry

func (*MytokenEntry) Store

func (mte *MytokenEntry) Store(rlog log.Ext1FieldLogger, tx *sqlx.Tx, comment string) error

Store stores the MytokenEntry in the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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