gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

doc.go (927B)


      1 // OAuth 2.0 server library for the Go programming language
      2 //
      3 //     package main
      4 //     import (
      5 //         "net/http"
      6 //         "github.com/superseriousbusiness/oauth2/v4/manage"
      7 //         "github.com/superseriousbusiness/oauth2/v4/server"
      8 //         "github.com/superseriousbusiness/oauth2/v4/store"
      9 //     )
     10 //     func main() {
     11 //         manager := manage.NewDefaultManager()
     12 //         manager.MustTokenStorage(store.NewMemoryTokenStore())
     13 //         manager.MapClientStorage(store.NewTestClientStore())
     14 //         srv := server.NewDefaultServer(manager)
     15 //         http.HandleFunc("/authorize", func(w http.ResponseWriter, r *http.Request) {
     16 //             srv.HandleAuthorizeRequest(w, r)
     17 //         })
     18 //         http.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
     19 //             srv.HandleTokenRequest(w, r)
     20 //         })
     21 //         http.ListenAndServe(":9096", nil)
     22 //     }
     23 
     24 package oauth2