github.com/tada-team/tdproto@v1.51.57/user_auth.go (about) 1 package tdproto 2 3 import "time" 4 5 const ( 6 AuthBySecureCookie = "cookie" 7 AuthByInsecureCookie = "insecure cookie" 8 AuthByToken = "token" 9 AuthByBotToken = "bot token" 10 ) 11 12 // User authentication 13 type UserAuth struct { 14 Created time.Time `json:"created"` 15 LastAccess time.Time `json:"last_access,omitempty"` 16 DebugAge int `json:"_age,omitempty"` 17 Uid string `json:"uid"` 18 //type of auth 19 Kind string `json:"kind"` 20 // ip address 21 Addr string `json:"addr,omitempty"` 22 // info about useragent 23 Useragent string `json:"user_agent,omitempty"` 24 // name of country 25 Country string `json:"country,omitempty"` 26 // name of region 27 Region string `json:"region,omitempty"` 28 // info about device (struct) 29 Device *PushDevice `json:"device,omitempty"` 30 }