本站源代码
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Mura Li d77176912b Use Go1.11 module (#5743) il y a 5 ans
..
.travis.yml Use Go1.11 module (#5743) il y a 5 ans
LICENSE Login via OpenID-2.0 (#618) il y a 7 ans
README.md Use Go1.11 module (#5743) il y a 5 ans
discover.go Login via OpenID-2.0 (#618) il y a 7 ans
discovery_cache.go Login via OpenID-2.0 (#618) il y a 7 ans
getter.go Login via OpenID-2.0 (#618) il y a 7 ans
html_discovery.go Migrate to dep (#3972) il y a 6 ans
nonce_store.go Login via OpenID-2.0 (#618) il y a 7 ans
normalizer.go Login via OpenID-2.0 (#618) il y a 7 ans
openid.go Login via OpenID-2.0 (#618) il y a 7 ans
redirect.go Login via OpenID-2.0 (#618) il y a 7 ans
verify.go Login via OpenID-2.0 (#618) il y a 7 ans
xrds.go Login via OpenID-2.0 (#618) il y a 7 ans
yadis_discovery.go Login via OpenID-2.0 (#618) il y a 7 ans

README.md

openid.go

This is a consumer (Relying party) implementation of OpenId 2.0, written in Go.

go get -u github.com/yohcop/openid-go

Build Status

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.

上海开阖软件有限公司 沪ICP备12045867号-1