v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSessionPayload

type ClientSessionPayload struct {
	ExpiresAt    int64  `json:"exp,omitempty"`           //expiration_time
	IssuedAt     int64  `json:"iat,omitempty"`           //issued_at_time
	Uuid         string `json:"uuid,omitempty"`          //token_uuid
	ClusterUuid  string `json:"cluster-uuid,omitempty"`  //cluster_uuid
	PollInterval int    `json:"poll-interval,omitempty"` //config_poll_interval
	Loglevel     string `json:"log-level,omitempty"`     //config_log_level
}

func (ClientSessionPayload) Valid

func (claims ClientSessionPayload) Valid() error

func (ClientSessionPayload) VerifyExpiresAt

func (claims ClientSessionPayload) VerifyExpiresAt(cmp int64, req bool) bool

func (ClientSessionPayload) VerifyIssuedAt

func (claims ClientSessionPayload) VerifyIssuedAt(cmp int64, req bool) bool

type Session

type Session struct {
	metav1.DbMeta   `json:",inline" xorm:"extends"`
	metav1.UuidMeta `json:",inline" xorm:"extends"` //inline uuidmeta
	SessionProperty `json:",inline" xorm:"extends"` //inline property
}

DATABASE SCHEMA: Session

func (Session) TableName

func (Session) TableName() string

type SessionProperty

type SessionProperty struct {
	ClusterUuid    string    `json:"cluster_uuid"    xorm:"'cluster_uuid'    char(32)     notnull index comment('user_uuid')"`
	Token          string    `json:"token"           xorm:"'token'           text         notnull       comment('token')"`
	IssuedAtTime   time.Time `json:"issued_at_time"  xorm:"'issued_at_time'  varchar(255) notnull       comment('issued at time')"`
	ExpirationTime time.Time `json:"expiration_time" xorm:"'expiration_time' varchar(255) notnull       comment('expiration time')"`
}

Session Property

Jump to

Keyboard shortcuts

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