Documentation ¶
Index ¶
- type Auth
- func (auth *Auth) CheckEncryptedData(ctx context.Context, encryptedMsgHash string) (result RspCheckEncryptedData, err error)
- func (auth *Auth) CheckEncryptedDataContext(ctx context.Context, encryptedMsgHash string) (result RspCheckEncryptedData, err error)
- func (auth *Auth) Code2Session(ctx context.Context, jsCode string) (result ResCode2Session, err error)
- func (auth *Auth) Code2SessionContext(ctx context.Context, jsCode string) (result ResCode2Session, err error)
- func (auth *Auth) GetPaidUnionID()
- type ResCode2Session
- type RspCheckEncryptedData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
Auth 登录/用户信息
func (*Auth) CheckEncryptedData ¶
func (auth *Auth) CheckEncryptedData(ctx context.Context, encryptedMsgHash string) (result RspCheckEncryptedData, err error)
CheckEncryptedData .检查加密信息是否由微信生成(当前只支持手机号加密数据),只能检测最近3天生成的加密数据
func (*Auth) CheckEncryptedDataContext ¶
func (auth *Auth) CheckEncryptedDataContext(ctx context.Context, encryptedMsgHash string) (result RspCheckEncryptedData, err error)
CheckEncryptedDataContext .检查加密信息是否由微信生成(当前只支持手机号加密数据),只能检测最近3天生成的加密数据
func (*Auth) Code2Session ¶
func (auth *Auth) Code2Session(ctx context.Context, jsCode string) (result ResCode2Session, err error)
Code2Session 登录凭证校验。
func (*Auth) Code2SessionContext ¶
func (auth *Auth) Code2SessionContext(ctx context.Context, jsCode string) (result ResCode2Session, err error)
Code2SessionContext 登录凭证校验。
func (*Auth) GetPaidUnionID ¶
func (auth *Auth) GetPaidUnionID()
GetPaidUnionID 用户支付完成后,获取该用户的 UnionId,无需用户授权
type ResCode2Session ¶
type ResCode2Session struct { util.CommonError OpenID string `json:"openid"` // 用户唯一标识 SessionKey string `json:"session_key"` // 会话密钥 UnionID string `json:"unionid"` // 用户在开放平台的唯一标识符,在满足UnionID下发条件的情况下会返回 }
ResCode2Session 登录凭证校验的返回结果
type RspCheckEncryptedData ¶
type RspCheckEncryptedData struct { util.CommonError Vaild bool `json:"vaild"` // 是否是合法的数据 CreateTime uint `json:"create_time"` // 加密数据生成的时间戳 }
RspCheckEncryptedData .
Click to show internal directories.
Click to hide internal directories.