57 Star 270 Fork 67

Lyric / oauth2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
doc.go 894 Bytes
一键复制 编辑 原始数据 按行查看 历史
// OAuth 2.0 server library for the Go programming language
//
// package main
// import (
// "net/http"
// "github.com/go-oauth2/oauth2/v4/manage"
// "github.com/go-oauth2/oauth2/v4/server"
// "github.com/go-oauth2/oauth2/v4/store"
// )
// func main() {
// manager := manage.NewDefaultManager()
// manager.MustTokenStorage(store.NewMemoryTokenStore())
// manager.MapClientStorage(store.NewTestClientStore())
// srv := server.NewDefaultServer(manager)
// http.HandleFunc("/authorize", func(w http.ResponseWriter, r *http.Request) {
// srv.HandleAuthorizeRequest(w, r)
// })
// http.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
// srv.HandleTokenRequest(w, r)
// })
// http.ListenAndServe(":9096", nil)
// }
package oauth2
Go
1
https://gitee.com/lyric/oauth2.git
git@gitee.com:lyric/oauth2.git
lyric
oauth2
oauth2
master

搜索帮助