We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type Client struct { Endpoint Endpoint // TokenStorage 和 Token 两个字段正常情况下只用指定一个, 如果两个同时被指定了, 优先使用 TokenStorage TokenStorage TokenStorage Token *Token // Client 自动将最新的 Token 更新到此字段, 不管 Token 字段一开始是否被指定!!! HttpClient *http.Client // 如果 HttpClient == nil 则默认用 util.DefaultHttpClient }
这里的 TokenStorage 和 Token 应该怎么初始化?
func (s *Service) WxqrLogin(c echo.Context, code, state, fromurl string) { oauth2Endpoint := openoauth2.NewEndpoint(s.cfgWx.WxOpenAppid, s.cfgWx.WxOpenSid) oauth2Client := oauth2.Client{oauth2Endpoint,?,?,nil} token, err := oauth2Client.ExchangeToken(code) if err != nil { return } userinfo, err := openoauth2.GetUserInfo(token.AccessToken, token.OpenId, "", nil) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这里的 TokenStorage 和 Token 应该怎么初始化?
The text was updated successfully, but these errors were encountered: