mirror of
https://github.com/go-gitea/gitea
synced 2024-11-15 22:41:44 +01:00
.. | ||
discover.go | ||
discovery_cache.go | ||
getter.go | ||
html_discovery.go | ||
LICENSE | ||
nonce_store.go | ||
normalizer.go | ||
openid.go | ||
README.md | ||
redirect.go | ||
verify.go | ||
xrds.go | ||
yadis_discovery.go |
openid.go
This is a consumer (Relying party) implementation of OpenId 2.0, written in Go.
go get -u github.com/yohcop/openid-go
Github
Be awesome! Feel free to clone and use according to the licence. If you make a useful change that can benefit others, send a pull request! This ensures that one version has all the good stuff and doesn't fall behind.
Code example
See _example/
for a simple webserver using the openID
implementation. Also, read the comment about the NonceStore towards
the top of that file. The example must be run for the openid-go
directory, like so:
go run _example/server.go
App Engine
In order to use this on Google App Engine, you need to create an instance with a custom *http.Client
provided by urlfetch.
oid := openid.NewOpenID(urlfetch.Client(appengine.NewContext(r)))
oid.RedirectURL(...)
oid.Verify(...)
License
Distributed under the Apache v2.0 license.