claim

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CTypeSite       = "site"
	CTypeUserLogged = "user_logged"
	CTypeUserDevice = "user_device"
	CTypeSession    = "session"
	CTypeData       = "data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterEditor

type AdapterEditor struct {
	TenantId   string `json:"-"`
	AdapterId  int64  `json:"adapter_id,omitempty"`
	DomainName string `json:"domain_name,omitempty"`
	Type       string `json:"type,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	UserGroup  string `json:"ugroup,omitempty"`
	SessionID  int64  `json:"session_id,omitempty"`
	DeviceId   int64  `json:"device_id,omitempty"`
}

type AdviseryTkt

type AdviseryTkt struct {
	Type   string `json:"type"`
	XID    string `json:"xid"`
	Expiry int64  `json:"expiry"`
	Data   []byte `json:"data"`
}

type AuthFirst

type AuthFirst struct {
	AuthId    int64  `json:"auth_id,omitempty"`
	NewUser   bool   `json:"new_user,omitempty"`
	UserID    string `json:"user_id,omitempty"`
	UserGroup string `json:"user_group,omitempty"`
	UserEmail string `json:"user_email,omitempty"`
	Type      string `json:"type,omitempty"`
	Expiry    int64  `json:"expiry,omitempty"`
	DeviceId  string `json:"device_id,omitempty"`
}

type AuthNext

type AuthNext struct {
	UserId      string `json:"user_id,omitempty"`
	UserGroup   string `json:"user_group,omitempty"`
	UserEmail   string `json:"user_email,omitempty"`
	DeviceId    string `json:"device_id,omitempty"`
	EmailVerify bool   `json:"email_verify,omitempty"`
	PassChange  bool   `json:"pass_change,omitempty"`
}

type BprintTkt

type BprintTkt struct {
	TenantId  string `json:"-"`
	Type      string `json:"type"`
	UserId    string `json:"user_id"`
	DeviceId  int64  `json:"device_id,omitempty"`
	SessionId int64  `json:"session_id,omitempty"`
	ExecId    int64  `json:"exec_id,omitempty"`
	PlugId    string `json:"plug_id,omitempty"`
	AgentId   string `json:"agent_id,omitempty"`
}

type Data

type Data struct {
	TenantId   string   `json:"-"`
	Type       string   `json:"type,omitempty"`
	UserID     string   `json:"user_id,omitempty"`
	UserGroup  string   `json:"ugroup,omitempty"`
	SessionID  int64    `json:"session_id,omitempty"`
	DeviceId   int64    `json:"device_id,omitempty"`
	DataSource string   `json:"source,omitempty"`
	DataGroup  string   `json:"group,omitempty"`
	DataTables []string `json:"tables,omitempty"`
	IsExec     bool     `json:"is_exec,omitempty"`
}

type ExecModTkt

type ExecModTkt struct {
	TenantId  string `json:"-"`
	Type      string `json:"type"`
	UserId    string `json:"user_id"`
	DeviceId  int64  `json:"device_id,omitempty"`
	SessionId int64  `json:"session_id,omitempty"`
	ExecId    int64  `json:"exec_id,omitempty"`
	PlugId    string `json:"plug_id,omitempty"`
	AgentId   string `json:"agent_id,omitempty"`
	ModName   string `json:"mod_name,omitempty"`
}

type Executor

type Executor struct {
	TenantId   string            `json:"-"`
	UserId     string            `json:"user_id,omitempty"`
	UserGroup  string            `json:"group,omitempty"`
	DeviceId   int64             `json:"device_id,omitempty"`
	Type       string            `json:"type,omitempty"`
	SessionId  int64             `json:"session_id,omitempty"`
	ExecId     int64             `json:"exec_id,omitempty"`
	PlugId     string            `json:"plug_id,omitempty"`
	AgentId    string            `json:"agent_id,omitempty"`
	ExecType   string            `json:"exec_type,omitempty"`
	TargetId   int64             `json:"target_id,omitempty"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

type Folder

type Folder struct {
	TenantId  string `json:"-"`
	UserId    string `json:"user_id,omitempty"`
	SessionID int64  `json:"session_id,omitempty"`
	DeviceId  int64  `json:"device_id,omitempty"`
	Type      string `json:"type,omitempty"`
	Expiry    int64  `json:"expiry,omitempty"`
	Source    string `json:"source,omitempty"`
	Folder    string `json:"folder,omitempty"`
}

type OauthState

type OauthState struct {
	TenantId  string `json:"tenant_id,omitempty"`
	AuthId    int64  `json:"id,omitempty"`
	UserGroup string `json:"user_group,omitempty"`
	DeviceId  string `json:"device_id,omitempty"`
}

type Operator

type Operator struct {
	XID          string `json:"xid,omitempty"`
	Type         string `json:"type,omitempty"`
	BindDeviceId string `json:"bind_device,omitempty"`
}

type PlugDevTkt

type PlugDevTkt struct {
	TenantId  string   `json:"-"`
	UserId    string   `json:"user_id"`
	UserGroup string   `json:"user_group"`
	BprintId  string   `json:"bprint_id"`
	PlugIds   []string `json:"plug_ids"`
	AllPlugs  bool     `json:"all_plugs"`
}

type PlugState

type PlugState struct {
	TenantId  string `json:"-"`
	Type      string `json:"type"`
	UserId    string `json:"user_id"`
	DeviceId  int64  `json:"device_id,omitempty"`
	SessionId int64  `json:"session_id,omitempty"`
	ExecId    int64  `json:"exec_id,omitempty"`
	PlugId    string `json:"plug_id,omitempty"`
	AgentId   string `json:"agent_id,omitempty"`
	KeyPrefix string `json:"key_prefix,omitempty"`
}

type PreAuthed

type PreAuthed struct {
	UserID     string `json:"user_id,omitempty"`
	UserGroup  string `json:"user_group,omitempty"`
	UserEmail  string `json:"user_email,omitempty"`
	AuthId     int64  `json:"auth_id,omitempty"`
	NeedsProof bool   `json:"needs_proof,omitempty"`
	DeviceId   string `json:"device_id,omitempty"`
}

type RoomTagTkt

type RoomTagTkt struct {
	Type   string   `json:"type"`
	Tags   []string `json:"tags"`
	Room   string   `json:"room"`
	Expiry int64    `json:"expiry"`
}

type Session

type Session struct {
	TenantId   string            `json:"-"`
	UserID     string            `json:"user,omitempty"`
	UserGroup  string            `json:"group,omitempty"`
	Type       string            `json:"type,omitempty"`
	SessionID  int64             `json:"session_id,omitempty"`
	DeviceId   int64             `json:"device_id,omitempty"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

func (*Session) AsUserCtx

func (u *Session) AsUserCtx() *UserContext

func (*Session) IsGuest

func (u *Session) IsGuest() bool

func (*Session) IsSuperAdmin

func (u *Session) IsSuperAdmin() bool

func (*Session) SetAttr

func (p *Session) SetAttr(key, value string)

type Site

type Site struct {
	TenantId        string            `json:"tenent_id,omitempty"`
	Type            string            `json:"type,omitempty"`
	XID             string            `json:"xid,omitempty"`
	Host            string            `json:"host,omitempty"`
	Scopes          []string          `json:"scopes,omitempty"`
	PinnedUserGroup string            `json:"ugroup,omitempty"`
	Attributes      map[string]string `json:"attributes,omitempty"`
}

func NewSiteClaim

func NewSiteClaim(tenantId, host string, scopes ...string) *Site

type SockdTkt

type SockdTkt struct {
	UserId    string `json:"user_id,omitempty"`
	Type      string `json:"type,omitempty"`
	DeviceId  int64  `json:"device_id,omitempty"`
	SessionId int64  `json:"session_id,omitempty"`
	Room      string `json:"room,omitempty"`
}

type User

type User struct {
	TenantId   string            `json:"tenent_id,omitempty"`
	UserID     string            `json:"user_id,omitempty"`
	UserGroup  string            `json:"user_group,omitempty"`
	Type       string            `json:"type,omitempty"`
	DeviceId   int64             `json:"device_id,omitempty"`
	Scopes     []string          `json:"scopes,omitempty"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

func NewUserDevice

func NewUserDevice(tenantId, userId, groupId string, scopes []string) *User

func NewUserLogged

func NewUserLogged(tenantId, userId, groupId string, device int64, scopes []string) *User

func (*User) DeriveSession

func (u *User) DeriveSession(sid int64) *Session

func (*User) IsGuest

func (u *User) IsGuest() bool

func (*User) IsSuperAdmin

func (u *User) IsSuperAdmin() bool

type UserContext

type UserContext struct {
	TenantId  string `json:"-"`
	UserID    string `json:"user_id,omitempty"`
	UserGroup string `json:"ugroup,omitempty"`
	SessionID int64  `json:"session_id,omitempty"`
	DeviceId  int64  `json:"device_id,omitempty"`
}

type UserMgmtTkt

type UserMgmtTkt struct {
	TenantId    string   `json:"-"`
	Type        string   `json:"type"`
	Group       string   `json:"group"`
	Update      bool     `json:"update"`
	List        bool     `json:"list"`
	ListScope   []string `json:"list_scope"`
	UpdateScope []string `json:"update_scope"`
}

Jump to

Keyboard shortcuts

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