2021-11-10 01:44:51 +08:00
|
|
|
|
package auth
|
2021-10-28 00:59:04 +08:00
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"git.esin.io/lab/weixin/clientapi/request"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Token struct {
|
2021-11-10 03:02:48 +08:00
|
|
|
|
request.Error `gorm:"-"`
|
|
|
|
|
AccessToken string `json:"access_token"` //获取到的凭证
|
|
|
|
|
ExpiresIn int32 `json:"expires_in"` //凭证有效时间,单位:秒
|
|
|
|
|
RefreshToken string `json:"refresh_token"` //有效期为30天,当失效之后,需要用户重新授
|
|
|
|
|
OpenID string `json:"openid" gorm:"index"`
|
|
|
|
|
Scope string `json:"scope"`
|
2021-10-28 00:59:04 +08:00
|
|
|
|
}
|