-
Notifications
You must be signed in to change notification settings - Fork 568
/
doc.go
24 lines (23 loc) · 894 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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