Documentation ¶
Index ¶
- func GetAccessTokenByPassword(params PasswordRequest) (*UserTokenInfo, *ErrorResult)
- func GetAntStaffParam(uid string) (*GetAntStaffParamResult, *ErrorResult)
- func GetUser(uid string) (info *LoginUserInfo, result *ErrorResult)
- func GetUserUpdate(uid string) (resResult *GetUserUpdateResult, result *ErrorResult)
- func GetUserVersion(uid string) (resResult *GetUserVersionResult, result *ErrorResult)
- func InitAPI(cfg *Config)
- func RegisterUpdateUser(w http.ResponseWriter, r *http.Request, ...) (err error)
- func SetRouterExpires(m map[string]int64)
- func UserActivate(uid string) (resResult *UserActivateResult, result *ErrorResult)
- func UserLoginToken(userName, password, service string) (tokenInfo *UserTokenInfo, result *ErrorResult)
- func UserRefreshToken(rtoken string) (tokenInfo *UserTokenInfo, result *ErrorResult)
- func VerifyLogin(username, password string) (info *LoginUserInfo, result *ErrorResult)
- func VerifyTokenV2(token string) (info *VerifyTokenInfo, result *ErrorResult)
- type AddStaffUserRequest
- type AuthorizeAddUserRequest
- type AuthorizeEditUserRequest
- type AuthorizeHandle
- func (ah *AuthorizeHandle) AddStaffUser(req *AddStaffUserRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) AddUser(uid string, user *AuthorizeAddUserRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) CheckDefaultPwd(uid string) (isDefault bool, result *ErrorResult)
- func (ah *AuthorizeHandle) ClearAuth(req *ClearAuthRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) DelStaffUser(uid string) (result *ErrorResult)
- func (ah *AuthorizeHandle) DelUser(uid string) (result *ErrorResult)
- func (ah *AuthorizeHandle) EditUser(uid string, user *AuthorizeEditUserRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) ForceGetToken() (tokenString string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetAccessTokenByPassword(params PasswordRequest) (*UserTokenInfo, *ErrorResult)
- func (ah *AuthorizeHandle) GetAntStaffParam(uid string) (*GetAntStaffParamResult, *ErrorResult)
- func (ah *AuthorizeHandle) GetAntUIDByUniversity(userID, university string) (uid string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetAntUIDList(service string, uids ...string) (auids []string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetConfig() (cfg *Config)
- func (ah *AuthorizeHandle) GetStaffParam(identify, uid string) (buID, addr string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetToken() (token string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetUpgradeToken(password, uid, clientID, clientSecret string) (info map[string]interface{}, result *ErrorResult)
- func (ah *AuthorizeHandle) GetUser(uid string) (info *LoginUserInfo, result *ErrorResult)
- func (ah *AuthorizeHandle) GetUserCode(uid string) (userCode string, result *ErrorResult)
- func (ah *AuthorizeHandle) GetUserUpdate(uid string) (resResult *GetUserUpdateResult, result *ErrorResult)
- func (ah *AuthorizeHandle) GetUserVersion(uid string) (resResult *GetUserVersionResult, result *ErrorResult)
- func (ah *AuthorizeHandle) MergeTELUser(req *AuthorizeMergeTELUserRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) MergeUser(req *AuthorizeMergeUserRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) ModifyPwd(uid, password string, services ...string) (result *ErrorResult)
- func (ah *AuthorizeHandle) UpdateAuthStatus(uid string) (result *ErrorResult)
- func (ah *AuthorizeHandle) UpdateUserBasic(req *UpdateUserBasicRequest) (result *ErrorResult)
- func (ah *AuthorizeHandle) UserActivate(uid string) (resResult *UserActivateResult, result *ErrorResult)
- func (ah *AuthorizeHandle) UserLoginToken(userName, password, service string) (*UserTokenInfo, *ErrorResult)
- func (ah *AuthorizeHandle) UserRefreshToken(rtoken string) (tokenInfo *UserTokenInfo, result *ErrorResult)
- func (ah *AuthorizeHandle) VerifyLogin(username, password string) (info *LoginUserInfo, result *ErrorResult)
- func (ah *AuthorizeHandle) VerifyToken(token string) (userID, clientID string, result *ErrorResult)
- func (ah *AuthorizeHandle) VerifyTokenV2(token string) (*VerifyTokenInfo, *ErrorResult)
- type AuthorizeMergeTELUserRequest
- type AuthorizeMergeUserRequest
- type ClearAuthRequest
- type Config
- type ErrorResult
- func AddStaffUser(req *AddStaffUserRequest) (result *ErrorResult)
- func AddUser(uid string, user *AuthorizeAddUserRequest) (result *ErrorResult)
- func CheckDefaultPwd(uid string) (isDefault bool, result *ErrorResult)
- func ClearAuth(req *ClearAuthRequest) (result *ErrorResult)
- func DelStaffUser(uid string) (result *ErrorResult)
- func DelUser(uid string) (result *ErrorResult)
- func EditUser(uid string, user *AuthorizeEditUserRequest) (result *ErrorResult)
- func ForceGetToken() (tokenString string, result *ErrorResult)
- func GetAntUIDByUniversity(userID, university string) (uid string, result *ErrorResult)
- func GetAntUIDList(service string, uids ...string) (auids []string, result *ErrorResult)
- func GetStaffParam(identify, uid string) (buID, addr string, result *ErrorResult)
- func GetToken() (token string, result *ErrorResult)
- func GetUpgradeToken(password, uid, clientID, clientSecret string) (info map[string]interface{}, result *ErrorResult)
- func GetUserCode(uid string) (userCode string, result *ErrorResult)
- func MergeTELUser(req *AuthorizeMergeTELUserRequest) (result *ErrorResult)
- func MergeUser(req *AuthorizeMergeUserRequest) (result *ErrorResult)
- func ModifyPwd(uid, password string, services ...string) (result *ErrorResult)
- func NewErrorResult(msg string, code ...int) *ErrorResult
- func UpdateAuthStatus(uid string) (result *ErrorResult)
- func UpdateUserBasic(req *UpdateUserBasicRequest) (result *ErrorResult)
- func VerifyToken(token string) (userID, clientID string, result *ErrorResult)
- type GetAntStaffParamResult
- type GetAntUIDByUniversityRequest
- type GetStaffParamRequest
- type GetUserCodeRequest
- type GetUserUpdateResult
- type GetUserVersionResult
- type LoginUserInfo
- type PasswordRequest
- type RequestReader
- type Token
- type TokenHandle
- type UpdateUserBasicRequest
- type UserActivateResult
- type UserInfo
- type UserTokenInfo
- type VerifyTokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccessTokenByPassword ¶
func GetAccessTokenByPassword(params PasswordRequest) (*UserTokenInfo, *ErrorResult)
GetAccessTokenByPassword 使用密码模式获取访问令牌
func GetAntStaffParam ¶
func GetAntStaffParam(uid string) (*GetAntStaffParamResult, *ErrorResult)
GetAntStaffParam 获取ANT用户学工参数
func GetUser ¶
func GetUser(uid string) (info *LoginUserInfo, result *ErrorResult)
GetUser 验证登录 uid 用户ID(唯一标识)
func GetUserUpdate ¶
func GetUserUpdate(uid string) (resResult *GetUserUpdateResult, result *ErrorResult)
GetUserUpdate 获取获取用户更新信息
func GetUserVersion ¶
func GetUserVersion(uid string) (resResult *GetUserVersionResult, result *ErrorResult)
GetUserVersion 获取用户版本信息
func RegisterUpdateUser ¶
func RegisterUpdateUser(w http.ResponseWriter, r *http.Request, callback func(uid string, info *UserInfo)) (err error)
RegisterUpdateUser 注册更新用户信息处理
func UserActivate ¶
func UserActivate(uid string) (resResult *UserActivateResult, result *ErrorResult)
UserActivate 用户激活
func UserLoginToken ¶
func UserLoginToken(userName, password, service string) (tokenInfo *UserTokenInfo, result *ErrorResult)
UserLoginToken 用户登录令牌
func UserRefreshToken ¶
func UserRefreshToken(rtoken string) (tokenInfo *UserTokenInfo, result *ErrorResult)
UserRefreshToken 用户更新令牌
func VerifyLogin ¶
func VerifyLogin(username, password string) (info *LoginUserInfo, result *ErrorResult)
VerifyLogin 验证登录 username 用户ID(唯一标识) password 密码 登录错误码说明:11 未知的用户,12 无效的用户,13 无效的密码
func VerifyTokenV2 ¶
func VerifyTokenV2(token string) (info *VerifyTokenInfo, result *ErrorResult)
VerifyTokenV2 验证令牌
Types ¶
type AddStaffUserRequest ¶
type AddStaffUserRequest struct { UID string // 用户标识 MobilePhone string // 手机号 UserCode string // 学号 IDCard string // 身份证号 Password string // 密码 University string // 学校ID Name string // 真实姓名 Sex string // 性别(F女,M男) DeptID string // 部门或学院ID }
AddStaffUserRequest 增加学工用户请求参数
type AuthorizeAddUserRequest ¶
type AuthorizeAddUserRequest struct { MobilePhone string UserCode string IDCard string Password string DefaultPassword string University string ServiceIdentify string }
AuthorizeAddUserRequest 增加用户信息请求
type AuthorizeEditUserRequest ¶
type AuthorizeEditUserRequest struct { MobilePhone string UserCode string IDCard string University string ServiceIdentify string }
AuthorizeEditUserRequest 编辑用户信息请求
type AuthorizeHandle ¶
type AuthorizeHandle struct {
// contains filtered or unexported fields
}
AuthorizeHandle 授权处理
func NewAuthorizeHandle ¶
func NewAuthorizeHandle(cfg *Config) *AuthorizeHandle
NewAuthorizeHandle 创建授权处理
func (*AuthorizeHandle) AddStaffUser ¶
func (ah *AuthorizeHandle) AddStaffUser(req *AddStaffUserRequest) (result *ErrorResult)
AddStaffUser 增加学工用户
func (*AuthorizeHandle) AddUser ¶
func (ah *AuthorizeHandle) AddUser(uid string, user *AuthorizeAddUserRequest) (result *ErrorResult)
AddUser 增加用户
func (*AuthorizeHandle) CheckDefaultPwd ¶
func (ah *AuthorizeHandle) CheckDefaultPwd(uid string) (isDefault bool, result *ErrorResult)
CheckDefaultPwd 检查默认密码
func (*AuthorizeHandle) ClearAuth ¶
func (ah *AuthorizeHandle) ClearAuth(req *ClearAuthRequest) (result *ErrorResult)
ClearAuth 清理用户认证信息
func (*AuthorizeHandle) DelStaffUser ¶
func (ah *AuthorizeHandle) DelStaffUser(uid string) (result *ErrorResult)
DelStaffUser 删除学工用户
func (*AuthorizeHandle) DelUser ¶
func (ah *AuthorizeHandle) DelUser(uid string) (result *ErrorResult)
DelUser 删除用户
func (*AuthorizeHandle) EditUser ¶
func (ah *AuthorizeHandle) EditUser(uid string, user *AuthorizeEditUserRequest) (result *ErrorResult)
EditUser 编辑用户信息
func (*AuthorizeHandle) ForceGetToken ¶
func (ah *AuthorizeHandle) ForceGetToken() (tokenString string, result *ErrorResult)
ForceGetToken 强制获取访问令牌
func (*AuthorizeHandle) GetAccessTokenByPassword ¶
func (ah *AuthorizeHandle) GetAccessTokenByPassword(params PasswordRequest) (*UserTokenInfo, *ErrorResult)
GetAccessTokenByPassword 使用密码模式获取访问令牌
func (*AuthorizeHandle) GetAntStaffParam ¶
func (ah *AuthorizeHandle) GetAntStaffParam(uid string) (*GetAntStaffParamResult, *ErrorResult)
GetAntStaffParam 获取ANT用户学工参数
func (*AuthorizeHandle) GetAntUIDByUniversity ¶
func (ah *AuthorizeHandle) GetAntUIDByUniversity(userID, university string) (uid string, result *ErrorResult)
GetAntUIDByUniversity 根据学校查询ANT用户ID
func (*AuthorizeHandle) GetAntUIDList ¶
func (ah *AuthorizeHandle) GetAntUIDList(service string, uids ...string) (auids []string, result *ErrorResult)
GetAntUIDList 获取ANT用户ID列表
func (*AuthorizeHandle) GetConfig ¶
func (ah *AuthorizeHandle) GetConfig() (cfg *Config)
GetConfig 获取配置参数
func (*AuthorizeHandle) GetStaffParam ¶
func (ah *AuthorizeHandle) GetStaffParam(identify, uid string) (buID, addr string, result *ErrorResult)
GetStaffParam 获取学工请求参数
func (*AuthorizeHandle) GetToken ¶
func (ah *AuthorizeHandle) GetToken() (token string, result *ErrorResult)
GetToken 获取访问令牌
func (*AuthorizeHandle) GetUpgradeToken ¶
func (ah *AuthorizeHandle) GetUpgradeToken(password, uid, clientID, clientSecret string) (info map[string]interface{}, result *ErrorResult)
GetUpgradeToken 获取升级令牌
func (*AuthorizeHandle) GetUser ¶
func (ah *AuthorizeHandle) GetUser(uid string) (info *LoginUserInfo, result *ErrorResult)
GetUser 验证登录 uid 用户ID(唯一标识)
func (*AuthorizeHandle) GetUserCode ¶
func (ah *AuthorizeHandle) GetUserCode(uid string) (userCode string, result *ErrorResult)
GetUserCode 根据用户ID获取UserCode
func (*AuthorizeHandle) GetUserUpdate ¶
func (ah *AuthorizeHandle) GetUserUpdate(uid string) (resResult *GetUserUpdateResult, result *ErrorResult)
GetUserUpdate 获取获取用户更新信息
func (*AuthorizeHandle) GetUserVersion ¶
func (ah *AuthorizeHandle) GetUserVersion(uid string) (resResult *GetUserVersionResult, result *ErrorResult)
GetUserVersion 获取用户版本信息
func (*AuthorizeHandle) MergeTELUser ¶
func (ah *AuthorizeHandle) MergeTELUser(req *AuthorizeMergeTELUserRequest) (result *ErrorResult)
MergeTELUser 合并手机号用户
func (*AuthorizeHandle) MergeUser ¶
func (ah *AuthorizeHandle) MergeUser(req *AuthorizeMergeUserRequest) (result *ErrorResult)
MergeUser 合并用户
func (*AuthorizeHandle) ModifyPwd ¶
func (ah *AuthorizeHandle) ModifyPwd(uid, password string, services ...string) (result *ErrorResult)
ModifyPwd 修改密码
func (*AuthorizeHandle) UpdateAuthStatus ¶
func (ah *AuthorizeHandle) UpdateAuthStatus(uid string) (result *ErrorResult)
UpdateAuthStatus 更新用户认证状态
func (*AuthorizeHandle) UpdateUserBasic ¶
func (ah *AuthorizeHandle) UpdateUserBasic(req *UpdateUserBasicRequest) (result *ErrorResult)
UpdateUserBasic 更新用户基础信息
func (*AuthorizeHandle) UserActivate ¶
func (ah *AuthorizeHandle) UserActivate(uid string) (resResult *UserActivateResult, result *ErrorResult)
UserActivate 用户激活
func (*AuthorizeHandle) UserLoginToken ¶
func (ah *AuthorizeHandle) UserLoginToken(userName, password, service string) (*UserTokenInfo, *ErrorResult)
UserLoginToken 用户登录令牌
func (*AuthorizeHandle) UserRefreshToken ¶
func (ah *AuthorizeHandle) UserRefreshToken(rtoken string) (tokenInfo *UserTokenInfo, result *ErrorResult)
UserRefreshToken 用户更新令牌
func (*AuthorizeHandle) VerifyLogin ¶
func (ah *AuthorizeHandle) VerifyLogin(username, password string) (info *LoginUserInfo, result *ErrorResult)
VerifyLogin 验证登录 username 用户ID(唯一标识) password 密码
func (*AuthorizeHandle) VerifyToken ¶
func (ah *AuthorizeHandle) VerifyToken(token string) (userID, clientID string, result *ErrorResult)
VerifyToken 验证令牌
func (*AuthorizeHandle) VerifyTokenV2 ¶
func (ah *AuthorizeHandle) VerifyTokenV2(token string) (*VerifyTokenInfo, *ErrorResult)
VerifyTokenV2 验证令牌
type AuthorizeMergeTELUserRequest ¶
AuthorizeMergeTELUserRequest 合并手机号用户请求参数
type AuthorizeMergeUserRequest ¶
type AuthorizeMergeUserRequest struct { UID string TUID string TUserCode string TUniversity string }
AuthorizeMergeUserRequest 合并用户请求参数
type ClearAuthRequest ¶
ClearAuthRequest 清理用户认证信息请求参数
type Config ¶
type Config struct { ASURL string // 授权服务URL ClientID string // 客户端ID ClientSecret string // 客户端秘钥 ServiceIdentify string // 服务标识 IsEnabledCache bool // 是否启用缓存 CacheGCInterval int // 缓存gc间隔(单位秒) MaxConns int }
Config 配置参数
type ErrorResult ¶
ErrorResult 响应错误结果
func AddStaffUser ¶
func AddStaffUser(req *AddStaffUserRequest) (result *ErrorResult)
AddStaffUser 增加学工用户
func AddUser ¶
func AddUser(uid string, user *AuthorizeAddUserRequest) (result *ErrorResult)
AddUser 增加用户
func CheckDefaultPwd ¶
func CheckDefaultPwd(uid string) (isDefault bool, result *ErrorResult)
CheckDefaultPwd 检查默认密码
func EditUser ¶
func EditUser(uid string, user *AuthorizeEditUserRequest) (result *ErrorResult)
EditUser 编辑用户信息
func ForceGetToken ¶
func ForceGetToken() (tokenString string, result *ErrorResult)
ForceGetToken 强制获取访问令牌
func GetAntUIDByUniversity ¶
func GetAntUIDByUniversity(userID, university string) (uid string, result *ErrorResult)
GetAntUIDByUniversity 根据学校查询ANT用户ID
func GetAntUIDList ¶
func GetAntUIDList(service string, uids ...string) (auids []string, result *ErrorResult)
GetAntUIDList 获取ANT用户ID列表
func GetStaffParam ¶
func GetStaffParam(identify, uid string) (buID, addr string, result *ErrorResult)
GetStaffParam 获取学工请求参数
func GetUpgradeToken ¶
func GetUpgradeToken(password, uid, clientID, clientSecret string) (info map[string]interface{}, result *ErrorResult)
GetUpgradeToken 获取升级令牌
func GetUserCode ¶
func GetUserCode(uid string) (userCode string, result *ErrorResult)
GetUserCode 根据用户ID获取UserCode
func MergeTELUser ¶
func MergeTELUser(req *AuthorizeMergeTELUserRequest) (result *ErrorResult)
MergeTELUser 合并手机号用户
func MergeUser ¶
func MergeUser(req *AuthorizeMergeUserRequest) (result *ErrorResult)
MergeUser 合并认证用户
func ModifyPwd ¶
func ModifyPwd(uid, password string, services ...string) (result *ErrorResult)
ModifyPwd 修改密码
func NewErrorResult ¶
func NewErrorResult(msg string, code ...int) *ErrorResult
NewErrorResult 创建错误结果
func UpdateAuthStatus ¶
func UpdateAuthStatus(uid string) (result *ErrorResult)
UpdateAuthStatus 更新用户认证状态
func UpdateUserBasic ¶
func UpdateUserBasic(req *UpdateUserBasicRequest) (result *ErrorResult)
UpdateUserBasic 更新用户基础信息
func VerifyToken ¶
func VerifyToken(token string) (userID, clientID string, result *ErrorResult)
VerifyToken 验证令牌
type GetAntStaffParamResult ¶
type GetAntStaffParamResult struct { BuID string Addr string University string IntelUserCode string }
GetAntStaffParamResult 获取ANT用户学工参数查询结果
type GetAntUIDByUniversityRequest ¶
type GetAntUIDByUniversityRequest struct { ServiceIdentify string `json:"ServiceIdentify"` UserID string `json:"UserID"` University string `json:"University"` }
GetAntUIDByUniversityRequest 获取学工账号绑定的集结号UID的请求
func (*GetAntUIDByUniversityRequest) Expires ¶
func (r *GetAntUIDByUniversityRequest) Expires(router string) int64
Expires 返回获取学工账号绑定的集结号UID的请求响应结果缓存时间
func (*GetAntUIDByUniversityRequest) Hash ¶
func (r *GetAntUIDByUniversityRequest) Hash() string
Hash 获取学工绑定集结号账号的UID请求参数的哈希值
type GetStaffParamRequest ¶
type GetStaffParamRequest struct { ServiceIdentify string `json:"ServiceIdentify"` UID string `json:"UID"` }
GetStaffParamRequest 获取学工参数的请求
func (*GetStaffParamRequest) Expires ¶
func (r *GetStaffParamRequest) Expires(router string) int64
Expires 查询学工参数的请求,其响应结果需要缓存的时间
func (*GetStaffParamRequest) Hash ¶
func (r *GetStaffParamRequest) Hash() string
Hash 根据请求中的ServiceIdentify和UID拼接后返回md5值
type GetUserCodeRequest ¶
type GetUserCodeRequest struct {
UID string `json:"UID"`
}
GetUserCodeRequest 查询用户学号的接口
func (*GetUserCodeRequest) Expires ¶
func (r *GetUserCodeRequest) Expires(router string) int64
Expires 返回获取学工号的请求响应结果缓存时间
func (*GetUserCodeRequest) Hash ¶
func (r *GetUserCodeRequest) Hash() string
Hash 返回查询用户学(工)号时请求的哈希值
type GetUserUpdateResult ¶
GetUserUpdateResult 获取用户更新信息
type GetUserVersionResult ¶
type GetUserVersionResult struct { ClearAuth int // 清理用户认证信息(0不清理 1清理) Version int // 版本号 Activate int // 激活状态(0已激活,1未激活) }
GetUserVersionResult 用户版本信息
type LoginUserInfo ¶
type LoginUserInfo struct { MobilePhone string // 手机号码 UserCode string // 用户代码 IDCard string // 身份证号码 Password string // 登录密码 DefaultPassword string // 默认登录密码 University string // 学校ID UserType string // 用户类型 }
LoginUserInfo 登录用户信息
type PasswordRequest ¶
type PasswordRequest struct { ClientID string // 客户端ID ClientSecret string // 客户端秘钥 LoginModel int // 登录模式(1手机号、身份证号登录,2学校、学号登录) University string // 学校编号 UserName string // 用户名 Service string // 服务标识 Password string // 密码 }
PasswordRequest 密码模式请求参数
type RequestReader ¶
type RequestReader interface { // Hash 返回请求的哈希值 Hash() string // Expires 返回请求缓存的过期时间 // 如果返回的值小于0,则不会使用缓存 Expires(router string) int64 }
RequestReader 请求
type Token ¶
type Token struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` CreateTime time.Time `json:"-"` }
Token 令牌信息
type TokenHandle ¶
type TokenHandle struct {
// contains filtered or unexported fields
}
TokenHandle 令牌验证处理
func (*TokenHandle) ForceGet ¶
func (th *TokenHandle) ForceGet() (token *Token, result *ErrorResult)
ForceGet 强制获取最新的令牌数据
func (*TokenHandle) Get ¶
func (th *TokenHandle) Get() (tokenString string, result *ErrorResult)
Get 获取令牌
type UpdateUserBasicRequest ¶
type UpdateUserBasicRequest struct { UID string // 用户标识 Name string // 真实姓名 DeptID string // 部门或学院ID }
UpdateUserBasicRequest 更新用户基础信息请求参数
type UserActivateResult ¶
type UserActivateResult struct { MobilePhone string // 手机号码 UserCode string // 用户代码 IDCard string // 身份证号码 University string // 学校ID RealName string // 真实姓名 Sex string // 性别(F女,M男) DeptID string // 部门ID(学工是学院或部门,学生是班级) UserType string // 用户类型(1学生 2老师) }
UserActivateResult 用户激活
type UserTokenInfo ¶
type UserTokenInfo struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` Expires int64 `json:"expires_in"` RefreshToken string `json:"refresh_token"` Scope string `json:"scope"` UserID string `json:"user_id"` }
UserTokenInfo 用户令牌信息
type VerifyTokenInfo ¶
type VerifyTokenInfo struct { UserID string `json:"user_id"` BusinessID string `json:"business_id"` UserCode string `json:"user_code"` ClientID string `json:"client_id"` ExpiresIn int `json:"expires_in"` ServiceCode string `json:"service_code"` ServiceAddr string `json:"service_addr"` }
VerifyTokenInfo 验证令牌的响应