Go 编程语言的 OAuth 2.0 服务器库。
一个开放的协议,可通过简单且标准的方法从 Web、移动和桌面应用程序中进行安全授权。 [![构建][build-status-image]][build-status-url] [![Codecov][codecov-image]][codecov-url] [![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![许可证][license-image]][license-url]
…go get -u -v github.com/go-oauth2/oauth2/v4/...server.go…go build server.go
./server授权请求: 授权代币请求:
{
"access_token": "J86XVRYSNFCFI233KXDL0Q",
"expires_in": 7200,
"scope": "read",
"token_type": "Bearer"
}一个完整的模拟授权码模式示例
授权码模式的模拟示例,请查看 示例
…http://localhost:9096/authorize?client_id=000000&response_type=code http://localhost:9096/token?grant_type=client_credentials&client_id=000000&client_secret=999999&scope=read
暂无开放 Issues,或尚未同步最近议题。