You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/apistruct/auth.go

60 lines
1.5 KiB

2 years ago
package apistruct
3 years ago
type UserRegisterReq struct {
Secret string `json:"secret" binding:"required,max=32"`
2 years ago
Platform int32 `json:"platform" binding:"required,min=1,max=12"`
3 years ago
ApiUserInfo
3 years ago
OperationID string `json:"operationID" binding:"required"`
}
type UserTokenInfo struct {
3 years ago
UserID string `json:"userID"`
3 years ago
Token string `json:"token"`
ExpiredTime int64 `json:"expiredTime"`
}
type UserRegisterResp struct {
CommResp
UserToken UserTokenInfo `json:"data"`
}
type UserTokenReq struct {
Secret string `json:"secret" binding:"required,max=32"`
2 years ago
Platform int32 `json:"platform" binding:"required,min=1,max=12"`
3 years ago
UserID string `json:"userID" binding:"required,min=1,max=64"`
OperationID string `json:"operationID" binding:"required"`
}
type UserTokenResp struct {
CommResp
UserToken UserTokenInfo `json:"data"`
}
3 years ago
2 years ago
type ForceLogoutReq struct {
2 years ago
Platform int32 `json:"platform" binding:"required,min=1,max=12"`
2 years ago
FromUserID string `json:"fromUserID" binding:"required,min=1,max=64"`
2 years ago
OperationID string `json:"operationID" binding:"required"`
}
type ForceLogoutResp struct {
CommResp
}
3 years ago
type ParseTokenReq struct {
OperationID string `json:"operationID" binding:"required"`
}
3 years ago
//type ParseTokenResp struct {
// CommResp
// ExpireTime int64 `json:"expireTime" binding:"required"`
//}
type ExpireTime struct {
3 years ago
ExpireTimeSeconds uint32 `json:"expireTimeSeconds" `
3 years ago
}
3 years ago
type ParseTokenResp struct {
CommResp
2 years ago
Data map[string]interface{} `json:"data" swaggerignore:"true"`
3 years ago
ExpireTime ExpireTime `json:"-"`
3 years ago
}