Versions in this module Expand all Collapse all v0 v0.6.0 Nov 18, 2020 Changes in this version + const CODE + const STATE + var HandleRedirect = func(openId, state string) (string, map[string]string, string, error) + func CallWxAPI(url string, method string, postData interface{}) ([]byte, error) + func GetUserInfo(accessToken, openId string) (map[string]interface{}, error) + func JsonCall(url string, method string, jsonData interface{}) ([]byte, error) + func ParseRedirectArgs(r *http.Request) (string, string, error) + type AccessToken struct + func NewAccessToken() *AccessToken + func NewAccessTokenWithParams(params *wxconf.WxParamsT) *AccessToken + func (token *AccessToken) Get() (string, error) + type RedirectHandler func(appId, openId, state string) (c string, h map[string]string, r string, err error) + func ToAppIdRedirectHandler(handler RedirectHandlerWithoutAppId) RedirectHandler + type RedirectHandlerWithoutAppId func(openId, state string) (string, map[string]string, string, error) + type WxAppIdAuthHandler struct + func StartAuthThreads(params *wxconf.WxParamsT, workerNum int) *WxAppIdAuthHandler + func (handler *WxAppIdAuthHandler) AuthRedirect(code string, state string) (string, map[string]string, string, error) + func (handler *WxAppIdAuthHandler) AuthRedirectUrl(w http.ResponseWriter, r *http.Request, code, state string) + func (handler *WxAppIdAuthHandler) GetAppId() string + func (handler *WxAppIdAuthHandler) HasRedirectUrl() bool + func (p *WxAppIdAuthHandler) RegisterRedictHandler(handler RedirectHandler) + func (p *WxAppIdAuthHandler) RegisterRedirectUrl(redirectUrl string, userInfoFlag ...string) + type WxUser struct + UserInfo WxUserInfo + func NewWxUser(params *wxconf.WxParamsT) *WxUser + func (user *WxUser) GetInfo() error + func (user *WxUser) GetInfoByAccessToken() (map[string]interface{}, error) + func (user *WxUser) GetOpenId(code string) (string, error) + func (user *WxUser) RefreshToken() error + func (user *WxUser) TokenExpired() bool + type WxUserInfo map[string]interface