Mura Li d77176912b | 5 years ago | |
---|---|---|
.. | ||
.travis.yml | 5 years ago | |
LICENSE | 7 years ago | |
README.md | 5 years ago | |
discover.go | 7 years ago | |
discovery_cache.go | 7 years ago | |
getter.go | 7 years ago | |
html_discovery.go | 6 years ago | |
nonce_store.go | 7 years ago | |
normalizer.go | 7 years ago | |
openid.go | 7 years ago | |
redirect.go | 7 years ago | |
verify.go | 7 years ago | |
xrds.go | 7 years ago | |
yadis_discovery.go | 7 years ago |
This is a consumer (Relying party) implementation of OpenId 2.0, written in Go.
go get -u github.com/yohcop/openid-go
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.
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
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(...)
Distributed under the Apache v2.0 license.