simpleoauth
1.0.0
Golang implements oauth2.0 authentication for several major mainstream platforms (currently only supports QQ, WeChat, and Weibo)
Usage: After configuring relevant information in config.go
package main
import (
"fmt"
"simpleoauth"
)
func main() {
m, _ := simpleoauth.NewManager("qq")
result := m.Authorize("此处填入认证通过后,第三方平台跳转带回来的CODE")
fmt.Println(result)
}
The return result is:
type AuthorizeResult struct{
Result bool //认证成功或失败
Userinfo map[string]interface{} //返回用户信息等基本资料
}