diff --git a/go.mod b/go.mod index 6baa407ec..605b1fe16 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ module github.com/markbates/goth -go 1.22 +go 1.18 require ( - github.com/golang-jwt/jwt/v4 v4.2.0 - github.com/gorilla/mux v1.6.2 - github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1 - github.com/gorilla/sessions v1.1.1 - github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da + github.com/golang-jwt/jwt/v4 v4.5.0 + github.com/gorilla/mux v1.8.1 + github.com/gorilla/pat v1.0.2 + github.com/gorilla/sessions v1.2.2 + github.com/jarcoal/httpmock v1.3.1 github.com/lestrrat-go/jwx v1.2.29 - github.com/markbates/going v1.0.0 - github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c + github.com/markbates/going v1.0.3 + github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 github.com/stretchr/testify v1.9.0 golang.org/x/oauth2 v0.21.0 ) @@ -18,10 +18,10 @@ require ( require ( cloud.google.com/go/compute/metadata v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/gorilla/context v1.1.1 // indirect - github.com/gorilla/securecookie v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/goccy/go-json v0.10.3 // indirect + github.com/gorilla/context v1.1.2 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect github.com/lestrrat-go/blackmagic v1.0.2 // indirect @@ -31,7 +31,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.24.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 17d848300..9756d4c50 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -8,28 +7,44 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o= +github.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM= github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1 h1:LqbZZ9sNMWVjeXS4NN5oVvhMjDyLhmA1LG86oSo+IqY= github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= +github.com/gorilla/pat v1.0.2 h1:TDh/RulbnPxMQACcwbgMF5Bf00jaGoeYBNu+XUFuwtE= +github.com/gorilla/pat v1.0.2/go.mod h1:ioQ7dFQ2KXmOmWLJs6vZAfRikcm2D2JyuLrL9b5wVCg= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= +github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.1.1 h1:YMDmfaK68mUixINzY/XjscuJ47uXFWSSHzFbBQM0PrE= github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= +github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY= +github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da h1:FjHUJJ7oBW4G/9j1KzlHaXL09LyMVM9rupS39lncbXk= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9deReOc7jgqp+e7LuFiCBH6Rm5hL32cLcEAArb4= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -52,8 +67,15 @@ github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNB github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/markbates/going v1.0.0 h1:DQw0ZP7NbNlFGcKbcE/IVSOAFzScxRtLpd0rLMzLhq0= github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA= +github.com/markbates/going v1.0.3 h1:mY45T5TvW+Xz5A6jY7lf4+NLg9D8+iuStIHyR7M8qsE= +github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c h1:3wkDRdxK92dF+c1ke2dtj7ZzemFWBHB9plnJOtlwdFA= github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM= +github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 h1:j2kD3MT1z4PXCiUllUJF9mWUESr9TWKS7iEKsQ/IipM= +github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -62,10 +84,12 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -78,8 +102,11 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -88,9 +115,11 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -109,7 +138,6 @@ golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -118,14 +146,12 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/gothic/gothic.go b/gothic/gothic.go index fab5998d5..86adf58e9 100644 --- a/gothic/gothic.go +++ b/gothic/gothic.go @@ -16,6 +16,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "os" @@ -340,7 +341,7 @@ func getSessionValue(session *sessions.Session, key string) (string, error) { if err != nil { return "", err } - s, err := io.ReadAll(r) + s, err := ioutil.ReadAll(r) if err != nil { return "", err } diff --git a/gothic/gothic_test.go b/gothic/gothic_test.go index 22c8448a2..bb0254a0a 100644 --- a/gothic/gothic_test.go +++ b/gothic/gothic_test.go @@ -5,7 +5,7 @@ import ( "compress/gzip" "fmt" "html" - "io" + "io/ioutil" "net/http" "net/http/httptest" "net/url" @@ -283,7 +283,7 @@ func ungzipString(value string) string { if err != nil { return "err" } - s, err := io.ReadAll(r) + s, err := ioutil.ReadAll(r) if err != nil { return "err" } diff --git a/providers/amazon/amazon.go b/providers/amazon/amazon.go index 5a0b175cb..7061e4d7a 100644 --- a/providers/amazon/amazon.go +++ b/providers/amazon/amazon.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" @@ -94,7 +95,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/azureadv2/azureadv2.go b/providers/azureadv2/azureadv2.go index e76419f80..523f79cce 100644 --- a/providers/azureadv2/azureadv2.go +++ b/providers/azureadv2/azureadv2.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -198,7 +199,7 @@ func userFromReader(r io.Reader, user *goth.User) error { UserPrincipalName string `json:"userPrincipalName"` // The user's principal name. }{} - userBytes, err := io.ReadAll(r) + userBytes, err := ioutil.ReadAll(r) if err != nil { return err } diff --git a/providers/battlenet/battlenet.go b/providers/battlenet/battlenet.go index 47abdaca8..3a52b47e7 100644 --- a/providers/battlenet/battlenet.go +++ b/providers/battlenet/battlenet.go @@ -6,7 +6,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -103,7 +103,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/bitbucket/bitbucket.go b/providers/bitbucket/bitbucket.go index 7c27a913d..06f2c9607 100644 --- a/providers/bitbucket/bitbucket.go +++ b/providers/bitbucket/bitbucket.go @@ -5,7 +5,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -134,7 +134,7 @@ func (p *Provider) getUserInfo(user *goth.User, sess *Session) error { return fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return err } diff --git a/providers/bitly/bitly.go b/providers/bitly/bitly.go index fc1b122c0..f302d5fe4 100644 --- a/providers/bitly/bitly.go +++ b/providers/bitly/bitly.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -96,7 +97,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { } defer resp.Body.Close() - buf, err := io.ReadAll(resp.Body) + buf, err := ioutil.ReadAll(resp.Body) if err != nil { return u, err } diff --git a/providers/classlink/provider.go b/providers/classlink/provider.go index 1dc683689..a64a67cae 100644 --- a/providers/classlink/provider.go +++ b/providers/classlink/provider.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -102,7 +102,7 @@ func (p Provider) FetchUser(session goth.Session) (goth.User, error) { defer resp.Body.Close() - bytes, err := io.ReadAll(resp.Body) + bytes, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err } diff --git a/providers/cloudfoundry/cf.go b/providers/cloudfoundry/cf.go index 5c06763c8..31eb63f2e 100644 --- a/providers/cloudfoundry/cf.go +++ b/providers/cloudfoundry/cf.go @@ -8,6 +8,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "strings" @@ -103,7 +104,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, resp.StatusCode) } - bits, err := io.ReadAll(resp.Body) + bits, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err } diff --git a/providers/cognito/cognito.go b/providers/cognito/cognito.go index ea4b23509..ff4bee58d 100644 --- a/providers/cognito/cognito.go +++ b/providers/cognito/cognito.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -127,7 +128,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/dailymotion/dailymotion.go b/providers/dailymotion/dailymotion.go index a8657a596..d3c1e1d24 100644 --- a/providers/dailymotion/dailymotion.go +++ b/providers/dailymotion/dailymotion.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" @@ -96,7 +97,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/deezer/deezer.go b/providers/deezer/deezer.go index 7f5ed1f6d..a0f9b9d1d 100644 --- a/providers/deezer/deezer.go +++ b/providers/deezer/deezer.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -97,7 +98,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/digitalocean/digitalocean.go b/providers/digitalocean/digitalocean.go index 560952f7f..69a7a639e 100644 --- a/providers/digitalocean/digitalocean.go +++ b/providers/digitalocean/digitalocean.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -104,7 +105,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, resp.StatusCode) } - bits, err := io.ReadAll(resp.Body) + bits, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err } diff --git a/providers/discord/discord.go b/providers/discord/discord.go index 75afd09f4..9b3030f2d 100644 --- a/providers/discord/discord.go +++ b/providers/discord/discord.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -142,7 +143,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, resp.StatusCode) } - bits, err := io.ReadAll(resp.Body) + bits, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err } diff --git a/providers/dropbox/dropbox.go b/providers/dropbox/dropbox.go index e02dce853..da55dba15 100644 --- a/providers/dropbox/dropbox.go +++ b/providers/dropbox/dropbox.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "strings" @@ -104,7 +105,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, resp.StatusCode) } - bits, err := io.ReadAll(resp.Body) + bits, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err } diff --git a/providers/eveonline/eveonline.go b/providers/eveonline/eveonline.go index 6bf156321..ad18776b6 100644 --- a/providers/eveonline/eveonline.go +++ b/providers/eveonline/eveonline.go @@ -6,7 +6,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -102,7 +102,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/facebook/facebook.go b/providers/facebook/facebook.go index f740f46f5..23773ca34 100644 --- a/providers/facebook/facebook.go +++ b/providers/facebook/facebook.go @@ -11,6 +11,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -126,7 +127,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/gitea/gitea.go b/providers/gitea/gitea.go index d04f2046c..6156df176 100644 --- a/providers/gitea/gitea.go +++ b/providers/gitea/gitea.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -114,7 +115,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/github/github.go b/providers/github/github.go index 37efff9de..962d07a33 100644 --- a/providers/github/github.go +++ b/providers/github/github.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "strconv" "strings" @@ -125,7 +126,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("GitHub API responded with a %d trying to fetch user information", response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/gitlab/gitlab.go b/providers/gitlab/gitlab.go index e3561eb8b..e5457cf0a 100644 --- a/providers/gitlab/gitlab.go +++ b/providers/gitlab/gitlab.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -115,7 +116,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/google/google.go b/providers/google/google.go index 629afb418..a266c91a2 100644 --- a/providers/google/google.go +++ b/providers/google/google.go @@ -5,7 +5,7 @@ package google import ( "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -110,7 +110,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - responseBytes, err := io.ReadAll(response.Body) + responseBytes, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/gplus/gplus.go b/providers/gplus/gplus.go index 832d723ad..61e9a0ea0 100644 --- a/providers/gplus/gplus.go +++ b/providers/gplus/gplus.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -101,7 +102,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/hubspot/hubspot.go b/providers/hubspot/hubspot.go index 10b292ddc..4358481f1 100644 --- a/providers/hubspot/hubspot.go +++ b/providers/hubspot/hubspot.go @@ -3,13 +3,14 @@ package hubspot import ( "encoding/json" "fmt" - "github.com/markbates/goth" - "golang.org/x/oauth2" - "io" + "io/ioutil" "net/http" "net/url" "strconv" "time" + + "github.com/markbates/goth" + "golang.org/x/oauth2" ) // These vars define the Authentication and Token URLS for Hubspot. @@ -109,7 +110,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - responseBytes, err := io.ReadAll(response.Body) + responseBytes, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/influxcloud/influxcloud.go b/providers/influxcloud/influxcloud.go index 220cb103c..7f7ad94c6 100644 --- a/providers/influxcloud/influxcloud.go +++ b/providers/influxcloud/influxcloud.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "os" @@ -128,7 +129,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/instagram/instagram.go b/providers/instagram/instagram.go index 0d1c9cc79..b4703dc44 100644 --- a/providers/instagram/instagram.go +++ b/providers/instagram/instagram.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" @@ -96,7 +97,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/intercom/intercom.go b/providers/intercom/intercom.go index 4d2e27834..b58e864ae 100644 --- a/providers/intercom/intercom.go +++ b/providers/intercom/intercom.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "strings" @@ -104,7 +105,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/kakao/kakao.go b/providers/kakao/kakao.go index 15d97c43f..f19e35ad8 100644 --- a/providers/kakao/kakao.go +++ b/providers/kakao/kakao.go @@ -6,7 +6,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "strconv" @@ -105,7 +105,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/lastfm/lastfm.go b/providers/lastfm/lastfm.go index 3d844455a..ad30e8d07 100644 --- a/providers/lastfm/lastfm.go +++ b/providers/lastfm/lastfm.go @@ -8,7 +8,7 @@ import ( "encoding/xml" "errors" "fmt" - "io" + "io/ioutil" "net/http" "net/url" "sort" @@ -168,7 +168,7 @@ func (p *Provider) request(sign bool, params map[string]string, result interface err = errors.New(fmt.Errorf("Request error(%v) %v", res.StatusCode, res.Status).Error()) return err } - body, err := io.ReadAll(res.Body) + body, err := ioutil.ReadAll(res.Body) if err != nil { return err } diff --git a/providers/line/line.go b/providers/line/line.go index 41cea75b4..e4d2e9555 100644 --- a/providers/line/line.go +++ b/providers/line/line.go @@ -6,7 +6,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -105,7 +105,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/mailru/mailru.go b/providers/mailru/mailru.go index f1d15ea0d..db38280e2 100644 --- a/providers/mailru/mailru.go +++ b/providers/mailru/mailru.go @@ -5,7 +5,7 @@ package mailru import ( "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -101,7 +101,7 @@ func (p *Provider) FetchUser(session goth.Session) (_ goth.User, err error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.name, res.StatusCode) } - buf, err := io.ReadAll(res.Body) + buf, err := ioutil.ReadAll(res.Body) if err != nil { return user, err } diff --git a/providers/mastodon/mastodon.go b/providers/mastodon/mastodon.go index 58c018cec..a69788d20 100644 --- a/providers/mastodon/mastodon.go +++ b/providers/mastodon/mastodon.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "strings" @@ -111,7 +112,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/meetup/meetup.go b/providers/meetup/meetup.go index 94aa053b5..3d1ef0c8c 100644 --- a/providers/meetup/meetup.go +++ b/providers/meetup/meetup.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "strconv" @@ -103,7 +104,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/naver/naver.go b/providers/naver/naver.go index 2ebce639a..dad6beb89 100644 --- a/providers/naver/naver.go +++ b/providers/naver/naver.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -71,7 +72,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/nextcloud/nextcloud.go b/providers/nextcloud/nextcloud.go index 43bc85976..23d3ee896 100644 --- a/providers/nextcloud/nextcloud.go +++ b/providers/nextcloud/nextcloud.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -131,7 +132,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/okta/okta.go b/providers/okta/okta.go index b871b3d38..b53eae2b4 100644 --- a/providers/okta/okta.go +++ b/providers/okta/okta.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -108,7 +109,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/onedrive/onedrive.go b/providers/onedrive/onedrive.go index 877894f83..dcb96e9cb 100644 --- a/providers/onedrive/onedrive.go +++ b/providers/onedrive/onedrive.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" @@ -93,7 +94,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/openidConnect/openidConnect.go b/providers/openidConnect/openidConnect.go index e33e3eda7..4a7215948 100644 --- a/providers/openidConnect/openidConnect.go +++ b/providers/openidConnect/openidConnect.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -288,7 +288,7 @@ func (p *Provider) RefreshTokenWithIDToken(refreshToken string) (*RefreshTokenRe return nil, fmt.Errorf("Non-200 response from RefreshToken: %d, WWW-Authenticate=%s", resp.StatusCode, resp.Header.Get("WWW-Authenticate")) } - body, err := io.ReadAll(resp.Body) + body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } @@ -401,7 +401,7 @@ func (p *Provider) fetchUserInfo(url, accessToken string) (map[string]interface{ // The UserInfo Claims MUST be returned as the members of a JSON object // http://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse - data, err := io.ReadAll(resp.Body) + data, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } @@ -420,7 +420,7 @@ func getOpenIDConfig(p *Provider, openIDAutoDiscoveryURL string) (*OpenIDConfig, return nil, fmt.Errorf("Non-success code for Discovery URL: %d", res.StatusCode) } - body, err := io.ReadAll(res.Body) + body, err := ioutil.ReadAll(res.Body) if err != nil { return nil, err } diff --git a/providers/patreon/patreon.go b/providers/patreon/patreon.go index b960aa242..a599b75e1 100644 --- a/providers/patreon/patreon.go +++ b/providers/patreon/patreon.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "time" @@ -142,7 +143,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/paypal/paypal.go b/providers/paypal/paypal.go index 64579f6dc..bca0b8b77 100644 --- a/providers/paypal/paypal.go +++ b/providers/paypal/paypal.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "os" @@ -125,7 +126,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/reddit/reddit.go b/providers/reddit/reddit.go index 2843c2f57..ce06143df 100644 --- a/providers/reddit/reddit.go +++ b/providers/reddit/reddit.go @@ -3,11 +3,12 @@ package reddit import ( "encoding/json" "fmt" - "github.com/markbates/goth" - "golang.org/x/oauth2" - "io" + "io/ioutil" "net/http" "time" + + "github.com/markbates/goth" + "golang.org/x/oauth2" ) const ( @@ -105,7 +106,7 @@ func (p *Provider) FetchUser(s goth.Session) (goth.User, error) { return goth.User{}, fmt.Errorf("%s responded with a %d trying to fetch user profile", p.providerName, res.StatusCode) } - bits, err := io.ReadAll(res.Body) + bits, err := ioutil.ReadAll(res.Body) if err != nil { return goth.User{}, err } diff --git a/providers/seatalk/seatalk.go b/providers/seatalk/seatalk.go index e399eb495..fd6161be6 100644 --- a/providers/seatalk/seatalk.go +++ b/providers/seatalk/seatalk.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -101,7 +101,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - responseBytes, err := io.ReadAll(response.Body) + responseBytes, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/slack/slack.go b/providers/slack/slack.go index daec6f422..84036ea96 100644 --- a/providers/slack/slack.go +++ b/providers/slack/slack.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -103,7 +104,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } @@ -129,7 +130,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err = io.ReadAll(response.Body) + bits, err = ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/soundcloud/soundcloud.go b/providers/soundcloud/soundcloud.go index 5e6dff719..2e11ee624 100644 --- a/providers/soundcloud/soundcloud.go +++ b/providers/soundcloud/soundcloud.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -98,7 +99,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/steam/session.go b/providers/steam/session.go index 7f06c8c98..8f60dc296 100644 --- a/providers/steam/session.go +++ b/providers/steam/session.go @@ -4,7 +4,7 @@ package steam import ( "encoding/json" "errors" - "io" + "io/ioutil" "net/url" "regexp" "strings" @@ -56,7 +56,7 @@ func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, return "", err } defer resp.Body.Close() - content, err := io.ReadAll(resp.Body) + content, err := ioutil.ReadAll(resp.Body) if err != nil { return "", err } diff --git a/providers/strava/strava.go b/providers/strava/strava.go index 4527844fe..785cc7fb2 100644 --- a/providers/strava/strava.go +++ b/providers/strava/strava.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -100,7 +101,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/tiktok/session.go b/providers/tiktok/session.go index ff917c820..2430b1749 100644 --- a/providers/tiktok/session.go +++ b/providers/tiktok/session.go @@ -3,7 +3,7 @@ package tiktok import ( "encoding/json" "errors" - "io" + "io/ioutil" "net/http" "net/url" "time" @@ -68,7 +68,7 @@ func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, }{} // Get the body bytes in case we have to parse an error response - bodyBytes, err := io.ReadAll(response.Body) + bodyBytes, err := ioutil.ReadAll(response.Body) if err != nil { return "", err } diff --git a/providers/tiktok/tiktok.go b/providers/tiktok/tiktok.go index 01066b789..1d3332188 100644 --- a/providers/tiktok/tiktok.go +++ b/providers/tiktok/tiktok.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -142,7 +143,7 @@ func userFromReader(reader io.Reader, user *goth.User) error { } `json:"data"` }{} - bodyBytes, err := io.ReadAll(reader) + bodyBytes, err := ioutil.ReadAll(reader) if err != nil { return err } @@ -206,7 +207,7 @@ func (p *Provider) RefreshToken(refreshToken string) (*oauth2.Token, error) { } // We get the body bytes in case we need to parse an error response - bodyBytes, err := io.ReadAll(refreshResponse.Body) + bodyBytes, err := ioutil.ReadAll(refreshResponse.Body) if err != nil { return nil, err } diff --git a/providers/twitch/twitch.go b/providers/twitch/twitch.go index c68844289..9f350f9bd 100644 --- a/providers/twitch/twitch.go +++ b/providers/twitch/twitch.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -327,7 +328,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { func userFromReader(r io.Reader, user *goth.User) error { - body, err := io.ReadAll(r) + body, err := ioutil.ReadAll(r) if err != nil { return err } @@ -379,7 +380,7 @@ func validateInfoFromReader(r io.Reader) (map[string]interface{}, error) { validate_info := make(map[string]interface{}) - body, err := io.ReadAll(r) + body, err := ioutil.ReadAll(r) if err != nil { return validate_info, err } diff --git a/providers/twitter/twitter.go b/providers/twitter/twitter.go index ad4abced2..4e2e2c98a 100644 --- a/providers/twitter/twitter.go +++ b/providers/twitter/twitter.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -118,7 +118,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/twitterv2/twitterv2.go b/providers/twitterv2/twitterv2.go index ee04ca72a..1dcb21292 100644 --- a/providers/twitterv2/twitterv2.go +++ b/providers/twitterv2/twitterv2.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" "fmt" - "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -118,7 +118,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/typetalk/typetalk.go b/providers/typetalk/typetalk.go index 9822cb475..73aa755cd 100644 --- a/providers/typetalk/typetalk.go +++ b/providers/typetalk/typetalk.go @@ -9,6 +9,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -102,7 +103,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user name", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } @@ -132,7 +133,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch profile", p.providerName, response.StatusCode) } - bits, err = io.ReadAll(response.Body) + bits, err = ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/vk/vk.go b/providers/vk/vk.go index f0619f2e5..615c81fbd 100644 --- a/providers/vk/vk.go +++ b/providers/vk/vk.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "strconv" @@ -97,7 +98,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/xero/xero.go b/providers/xero/xero.go index bb7701608..bb642c353 100644 --- a/providers/xero/xero.go +++ b/providers/xero/xero.go @@ -7,7 +7,6 @@ import ( "encoding/pem" "errors" "fmt" - "io" "io/ioutil" "log" "net/http" @@ -156,7 +155,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { } var apiResponse APIResponse - responseBytes, err := io.ReadAll(response.Body) + responseBytes, err := ioutil.ReadAll(response.Body) if err != nil { return user, fmt.Errorf("Could not read response: %s", err.Error()) } diff --git a/providers/yammer/session.go b/providers/yammer/session.go index b39019ef9..cd8fe781a 100644 --- a/providers/yammer/session.go +++ b/providers/yammer/session.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -75,7 +76,7 @@ func retrieveAuthData(p *Provider, TokenURL string, v url.Values) (map[string]ma return nil, err } defer r.Body.Close() - body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) + body, err := ioutil.ReadAll(io.LimitReader(r.Body, 1<<20)) if err != nil { return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) } diff --git a/providers/yammer/yammer.go b/providers/yammer/yammer.go index bcc7a2168..f7e803ea2 100644 --- a/providers/yammer/yammer.go +++ b/providers/yammer/yammer.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" "fmt" - "io" + "io/ioutil" "net/http" "strconv" @@ -99,7 +99,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, response.StatusCode) } - bits, err := io.ReadAll(response.Body) + bits, err := ioutil.ReadAll(response.Body) if err != nil { return user, err } diff --git a/providers/yandex/yandex.go b/providers/yandex/yandex.go index a500564ea..e550a80f3 100644 --- a/providers/yandex/yandex.go +++ b/providers/yandex/yandex.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "github.com/markbates/goth" @@ -102,7 +103,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { return user, fmt.Errorf("%s responded with a %d trying to fetch user information", p.providerName, resp.StatusCode) } - bits, err := io.ReadAll(resp.Body) + bits, err := ioutil.ReadAll(resp.Body) if err != nil { return user, err }