forked from go-oauth2/oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
24 lines (23 loc) · 858 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"
// "gopkg.in/oauth2.v3/manage"
// "gopkg.in/oauth2.v3/server"
// "gopkg.in/oauth2.v3/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