You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
gitea/vendor/github.com/yohcop/openid-go
6543 dbb74978f7
github.com/yohcop/openid-go update to first tagged version (#11357)
5 years ago
..
.travis.yml github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
LICENSE Login via OpenID-2.0 (#618) 8 years ago
README.md github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
discover.go Login via OpenID-2.0 (#618) 8 years ago
discovery_cache.go Login via OpenID-2.0 (#618) 8 years ago
getter.go Login via OpenID-2.0 (#618) 8 years ago
go.mod github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
go.sum github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
html_discovery.go Migrate to dep (#3972) 7 years ago
nonce_store.go github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
normalizer.go github.com/yohcop/openid-go update to first tagged version (#11357) 5 years ago
openid.go Login via OpenID-2.0 (#618) 8 years ago
redirect.go Login via OpenID-2.0 (#618) 8 years ago
verify.go Login via OpenID-2.0 (#618) 8 years ago
xrds.go Login via OpenID-2.0 (#618) 8 years ago
yadis_discovery.go Login via OpenID-2.0 (#618) 8 years ago

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.

Libraries

Here is a set of libraries I found on GitHub that could make using this library easier depending on your backends. I haven't tested them, this list is for reference only, and in no particular order:

  • Gacnt/myopenid "A Yohcop-Openid Nonce/Discovery storage replacement", using MySQL.
  • Gacnt/sqlxid "An SQLX Adapter for Nonce / Discovery Cache store"
  • Gacnt/gormid "Use GORM (Go Object Relational Mapping) to store OpenID DiscoveryCache / Nonce in a database"
  • hectorj/mysqlOpenID "MySQL OpenID is a package to replace the in memory storage of discoveryCache and nonceStore."