本站源代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Mura Li d77176912b Use Go1.11 module (#5743) 5 年前
..
.travis.yml Use Go1.11 module (#5743) 5 年前
LICENSE Login via OpenID-2.0 (#618) 7 年前
README.md Use Go1.11 module (#5743) 5 年前
discover.go Login via OpenID-2.0 (#618) 7 年前
discovery_cache.go Login via OpenID-2.0 (#618) 7 年前
getter.go Login via OpenID-2.0 (#618) 7 年前
html_discovery.go Migrate to dep (#3972) 6 年前
nonce_store.go Login via OpenID-2.0 (#618) 7 年前
normalizer.go Login via OpenID-2.0 (#618) 7 年前
openid.go Login via OpenID-2.0 (#618) 7 年前
redirect.go Login via OpenID-2.0 (#618) 7 年前
verify.go Login via OpenID-2.0 (#618) 7 年前
xrds.go Login via OpenID-2.0 (#618) 7 年前
yadis_discovery.go Login via OpenID-2.0 (#618) 7 年前

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