Commit b3540bb1 authored by ale's avatar ale
Browse files

Remove override for go-common:webauthn

parent ce37b1f5
Pipeline #24849 passed with stages
in 3 minutes and 55 seconds
...@@ -3,7 +3,7 @@ module git.autistici.org/ai3/accountserver ...@@ -3,7 +3,7 @@ module git.autistici.org/ai3/accountserver
go 1.14 go 1.14
require ( require (
git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570 git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297
git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33 git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33
git.autistici.org/id/auth v0.0.0-20210507085352-c4f218c42591 git.autistici.org/id/auth v0.0.0-20210507085352-c4f218c42591
git.autistici.org/id/go-sso v0.0.0-20210117165919-e56e6579953d git.autistici.org/id/go-sso v0.0.0-20210117165919-e56e6579953d
...@@ -17,12 +17,10 @@ require ( ...@@ -17,12 +17,10 @@ require (
github.com/pquerna/otp v1.3.0 github.com/pquerna/otp v1.3.0
github.com/prometheus/client_golang v1.11.0 github.com/prometheus/client_golang v1.11.0
github.com/sethvargo/go-password v0.2.0 github.com/sethvargo/go-password v0.2.0
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 v2.4.0
) )
replace git.autistici.org/ai3/go-common => /home/ale/src/go/src/git.autistici.org/ai3/go-common
replace git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth replace git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth
...@@ -44,6 +44,9 @@ git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e h1:nmuXsaCsbS ...@@ -44,6 +44,9 @@ git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e h1:nmuXsaCsbS
git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e/go.mod h1:cLzAklDVrfLAgJSny1+oPf17m2G4VK447OpE0ssqxFw= git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e/go.mod h1:cLzAklDVrfLAgJSny1+oPf17m2G4VK447OpE0ssqxFw=
git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008 h1:AAo57H2BTW1KaKZNEL3udwUf9PM9uJdWwQoOYiopTO4= git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008 h1:AAo57H2BTW1KaKZNEL3udwUf9PM9uJdWwQoOYiopTO4=
git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008/go.mod h1:FUD4csv4WEpcXD0APGOnlSs+a9WpNjP0z9YcVGTN6sI= git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008/go.mod h1:FUD4csv4WEpcXD0APGOnlSs+a9WpNjP0z9YcVGTN6sI=
git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570/go.mod h1:5CE8ECPZsIGYEw4hIuBbUwMHbQhG81CaSU2VMvL2j6w=
git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297 h1:RUlGEhPRng4202IY9rv91vI3l7x0eS/u4y1lzOEoK1A=
git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297/go.mod h1:mw4pRTvvlll+Uvsfw6Brkx30hYZBi1P0mRAxoECNWY4=
git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33 h1:r8/Z/jrey5pK6GiPR6i9vTEx8yR3xcspDC7LLWp4mrc= git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33 h1:r8/Z/jrey5pK6GiPR6i9vTEx8yR3xcspDC7LLWp4mrc=
git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33/go.mod h1:SI8ChSMUpEgxWFvzc/FGFtcrOuYTVu6Ai5cTOjMP3+U= git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33/go.mod h1:SI8ChSMUpEgxWFvzc/FGFtcrOuYTVu6Ai5cTOjMP3+U=
git.autistici.org/id/auth v0.0.0-20210110171913-dd493db32815/go.mod h1:Hq4zcqE2hbrXsC9j79kzfnBf2BqlGmuVCRIz+AwX/FY= git.autistici.org/id/auth v0.0.0-20210110171913-dd493db32815/go.mod h1:Hq4zcqE2hbrXsC9j79kzfnBf2BqlGmuVCRIz+AwX/FY=
...@@ -680,6 +683,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s3 ...@@ -680,6 +683,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s3
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI=
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8=
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
......
...@@ -24,6 +24,6 @@ require ( ...@@ -24,6 +24,6 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 github.com/russross/blackfriday/v2 v2.1.0
github.com/theckman/go-flock v0.8.1 github.com/theckman/go-flock v0.8.1
go.opencensus.io v0.23.0 go.opencensus.io v0.23.0
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
) )
...@@ -204,6 +204,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh ...@@ -204,6 +204,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI=
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8=
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
......
package serverutil
import (
"encoding/json"
"log"
"mime"
"net/http"
)
// DecodeJSONRequest decodes a JSON object from an incoming HTTP POST
// request and return true when successful. In case of errors, it will
// write an error response to w and return false.
func DecodeJSONRequest(w http.ResponseWriter, r *http.Request, obj interface{}) bool {
if r.Method != "POST" {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return false
}
if ct, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")); ct != "application/json" {
http.Error(w, "Need JSON request", http.StatusBadRequest)
return false
}
if err := json.NewDecoder(r.Body).Decode(obj); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return false
}
return true
}
// EncodeJSONResponse writes an application/json response to w.
func EncodeJSONResponse(w http.ResponseWriter, obj interface{}) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Cache-Control", "no-store")
w.Header().Set("Expires", "-1")
w.Header().Set("X-Content-Type-Options", "nosniff")
err := json.NewEncoder(w).Encode(obj)
if err != nil {
log.Printf("error writing JSON response: %v", err)
// Too late to return an error to the client now.
}
}
# contrib.go.opencensus.io/exporter/zipkin v0.1.2 # contrib.go.opencensus.io/exporter/zipkin v0.1.2
contrib.go.opencensus.io/exporter/zipkin contrib.go.opencensus.io/exporter/zipkin
# git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570 => /home/ale/src/go/src/git.autistici.org/ai3/go-common # git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297
## explicit ## explicit
git.autistici.org/ai3/go-common git.autistici.org/ai3/go-common
git.autistici.org/ai3/go-common/clientutil git.autistici.org/ai3/go-common/clientutil
...@@ -173,7 +173,7 @@ go.opencensus.io/trace ...@@ -173,7 +173,7 @@ go.opencensus.io/trace
go.opencensus.io/trace/internal go.opencensus.io/trace/internal
go.opencensus.io/trace/propagation go.opencensus.io/trace/propagation
go.opencensus.io/trace/tracestate go.opencensus.io/trace/tracestate
# golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 # golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
## explicit ## explicit
golang.org/x/crypto/argon2 golang.org/x/crypto/argon2
golang.org/x/crypto/blake2b golang.org/x/crypto/blake2b
...@@ -230,5 +230,4 @@ google.golang.org/protobuf/types/known/timestamppb ...@@ -230,5 +230,4 @@ google.golang.org/protobuf/types/known/timestamppb
# gopkg.in/yaml.v2 v2.4.0 # gopkg.in/yaml.v2 v2.4.0
## explicit ## explicit
gopkg.in/yaml.v2 gopkg.in/yaml.v2
# git.autistici.org/ai3/go-common => /home/ale/src/go/src/git.autistici.org/ai3/go-common
# git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth # git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment