Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
BaseDTO
Account string `json:"account"` // 用户的标识,可以是 UserID, UserName, Email, Phone ... 等
Mechanism string `json:"mechanism"` // 登录机制
Secret util.Base64 `json:"secret"` // 可以是,但不局限于密码等,取决于具体的机制
// 以下表示返回结果
Success bool `json:"success"` // 表示已登录成功
WantMore bool `json:"wantmore"` // 指出需要更多的步骤
Want string `json:"want"` // 指出需要进一步提供的证明
}
Auth ...
type Session ¶
type Session struct {
BaseDTO
Email string `json:"email"` // 用户的邮件地址(可能为空)
Phone string `json:"phone"` // 用户的电话号码(可能为空)
Avatar string `json:"avatar"` // 用户的头像(HTTP-URL)
DisplayName string `json:"nickname"` // 用户的昵称
ID string `json:"userid"` // 用户ID
Name string `json:"username"` // 用户名
CreatedAt util.Time `json:"createdat"` // 会话的创建时间,通常等于登录的时间
UpdatedAt util.Time `json:"updatedat"` // 会话的更新时间
Authenticated bool `json:"authenticated"` // 表示用户已登录
}
Session ...
Click to show internal directories.
Click to hide internal directories.