示例#1
0
 /*    */ private UserInfoBean getUserInfo(String openid) /*    */ throws QQConnectException
       /*    */ {
   /* 44 */ return new UserInfoBean(
       this.client
           .get(
               QQConnectConfig.getValue("getUserInfoURL"),
               new PostParameter[] {
                 new PostParameter("openid", openid),
                 new PostParameter("oauth_consumer_key", QQConnectConfig.getValue("app_ID")),
                 new PostParameter("access_token", this.client.getToken()),
                 new PostParameter("format", "json")
               })
           .asJSONObject());
   /*    */ }
示例#2
0
  @RequestMapping("/connector/qq_login")
  public String qqLogin(HttpServletRequest request) {
    String redirect = "redirect:/redirect";
    try {
      String redirectURI =
          request.getScheme()
              + "://"
              + request.getServerName()
              + request.getContextPath()
              + "/connector/qq";
      QQConnectConfig.updateProperties(QQConnectInitService.REDIRECT_URI, redirectURI);
      redirect = "redirect:" + OAUTH.getAuthorizeURL(request);
    } catch (QQConnectException e) {
      e.printStackTrace();
    }

    return redirect;
  }