add oauth2 qq support

This commit is contained in:
skyblue 2014-04-13 01:15:19 +08:00
parent f92851e347
commit 75d2affcbf
5 changed files with 100 additions and 6 deletions

View file

@ -1,8 +1,13 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package user
import (
"encoding/json"
"net/http"
"net/url"
"strconv"
"strings"
@ -42,7 +47,7 @@ func (s *SocialGithub) SetRedirectUrl(url string) {
s.Transport.Config.RedirectURL = url
}
func (s *SocialGithub) UserInfo(token *oauth.Token) (*BasicUserInfo, error) {
func (s *SocialGithub) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error) {
transport := &oauth.Transport{
Token: token,
}