From dbb74978f7a4574d237952349437e7ac03764e3b Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 10 May 2020 10:53:04 +0200 Subject: github.com/yohcop/openid-go update to first tagged version (#11357) --- vendor/github.com/yohcop/openid-go/.travis.yml | 17 +++++++++++++---- vendor/github.com/yohcop/openid-go/README.md | 9 +++++++++ vendor/github.com/yohcop/openid-go/go.mod | 5 +++++ vendor/github.com/yohcop/openid-go/go.sum | 5 +++++ vendor/github.com/yohcop/openid-go/nonce_store.go | 2 +- vendor/github.com/yohcop/openid-go/normalizer.go | 2 +- vendor/modules.txt | 4 ++-- 7 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 vendor/github.com/yohcop/openid-go/go.mod create mode 100644 vendor/github.com/yohcop/openid-go/go.sum (limited to 'vendor') diff --git a/vendor/github.com/yohcop/openid-go/.travis.yml b/vendor/github.com/yohcop/openid-go/.travis.yml index e0937781cd..71a3e6e295 100644 --- a/vendor/github.com/yohcop/openid-go/.travis.yml +++ b/vendor/github.com/yohcop/openid-go/.travis.yml @@ -3,10 +3,19 @@ sudo: false language: go go: - - 1.3.3 - - 1.4.2 - - 1.5.2 - - 1.6beta2 + - 1.3.x + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x + - 1.12.x + +env: + - GO111MODULE=on # Get deps, build, test, and ensure the code is gofmt'ed. script: diff --git a/vendor/github.com/yohcop/openid-go/README.md b/vendor/github.com/yohcop/openid-go/README.md index f617126d2e..1d1afc6bcd 100644 --- a/vendor/github.com/yohcop/openid-go/README.md +++ b/vendor/github.com/yohcop/openid-go/README.md @@ -36,3 +36,12 @@ oid.Verify(...) ## License Distributed under the [Apache v2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html). + +## 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](https://github.com/Gacnt/myopenid) "A Yohcop-Openid Nonce/Discovery storage replacement", using MySQL. +- [Gacnt/sqlxid](https://github.com/Gacnt/sqlxid) "An SQLX Adapter for Nonce / Discovery Cache store" +- [Gacnt/gormid](https://github.com/Gacnt/gormid) "Use GORM (Go Object Relational Mapping) to store OpenID DiscoveryCache / Nonce in a database" +- [hectorj/mysqlOpenID](https://github.com/hectorj/mysqlOpenID) "MySQL OpenID is a package to replace the in memory storage of discoveryCache and nonceStore." diff --git a/vendor/github.com/yohcop/openid-go/go.mod b/vendor/github.com/yohcop/openid-go/go.mod new file mode 100644 index 0000000000..f664bd5d1d --- /dev/null +++ b/vendor/github.com/yohcop/openid-go/go.mod @@ -0,0 +1,5 @@ +module github.com/yohcop/openid-go + +go 1.3 + +require golang.org/x/net v0.0.0-20190522155817-f3200d17e092 diff --git a/vendor/github.com/yohcop/openid-go/go.sum b/vendor/github.com/yohcop/openid-go/go.sum new file mode 100644 index 0000000000..fedb312249 --- /dev/null +++ b/vendor/github.com/yohcop/openid-go/go.sum @@ -0,0 +1,5 @@ +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/yohcop/openid-go/nonce_store.go b/vendor/github.com/yohcop/openid-go/nonce_store.go index 684a1acb0e..3f54acbd15 100644 --- a/vendor/github.com/yohcop/openid-go/nonce_store.go +++ b/vendor/github.com/yohcop/openid-go/nonce_store.go @@ -55,7 +55,7 @@ func (d *SimpleNonceStore) Accept(endpoint, nonce string) error { now := time.Now() diff := now.Sub(ts) if diff > *maxNonceAge { - return fmt.Errorf("Nonce too old: %ds", diff.Seconds()) + return fmt.Errorf("Nonce too old: %.2fs", diff.Seconds()) } s := nonce[20:] diff --git a/vendor/github.com/yohcop/openid-go/normalizer.go b/vendor/github.com/yohcop/openid-go/normalizer.go index 8c7aa34a68..3384143d00 100644 --- a/vendor/github.com/yohcop/openid-go/normalizer.go +++ b/vendor/github.com/yohcop/openid-go/normalizer.go @@ -25,7 +25,7 @@ func Normalize(id string) (string, error) { // Global Context Symbol ("=", "@", "+", "$", "!") or "(", as // defined in Section 2.2.1 of [XRI_Syntax_2.0], then the input // SHOULD be treated as an XRI. - if b := id[0]; b == '=' || b == '@' || b == '+' || b == '$' || b == '!' { + if b := id[0]; b == '=' || b == '@' || b == '+' || b == '$' || b == '!' || b == '(' { return id, errors.New("XRI identifiers not supported") } diff --git a/vendor/modules.txt b/vendor/modules.txt index 8a39d1e8c9..015bb80ee7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -645,7 +645,7 @@ github.com/willf/bitset github.com/xanzy/go-gitlab # github.com/xanzy/ssh-agent v0.2.1 github.com/xanzy/ssh-agent -# github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53 +# github.com/yohcop/openid-go v1.0.0 ## explicit github.com/yohcop/openid-go # github.com/yuin/goldmark v1.1.25 @@ -702,7 +702,7 @@ golang.org/x/crypto/ssh/knownhosts # golang.org/x/mod v0.2.0 golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e +# golang.org/x/net v0.0.0-20200506145744-7e3656a0809f ## explicit golang.org/x/net/context golang.org/x/net/context/ctxhttp -- cgit v1.2.3