Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCreds = errors.New("invalid telegram creds")
ErrInvalidCreds represents error in case of having invalid Telegram auth credentials
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { ID int64 `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Username string `json:"username"` PhotoURL string `json:"photo_url"` AuthDate int64 `json:"auth_date"` Hash string `json:"hash"` }
Credentials are Telegram Login credentials available for parsing from JSON.
func (*Credentials) String ¶
func (c *Credentials) String() string
String builds credentials string, excluding hash field.
func (*Credentials) Verify ¶
func (c *Credentials) Verify(token []byte) error
Verify checks if the credentials are from Telegram. Returns nil error if credentials are from Telegram.
Click to show internal directories.
Click to hide internal directories.