From 06d88091ea259c04a37f834b07ba65d0a0e24569 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 10 Nov 2021 17:00:02 +0000 Subject: [PATCH] point to this repo --- .golangci.yml | 2 +- README.md | 6 +++--- example/idp/idp.go | 4 ++-- example/service.go | 2 +- example/trivial/trivial.go | 2 +- go.mod | 23 ++--------------------- go.sum | 2 ++ identity_provider.go | 4 ++-- identity_provider_test.go | 6 +++--- saml.go | 4 ++-- samlidp/samlidp.go | 4 ++-- samlidp/samlidp_test.go | 4 ++-- samlidp/service.go | 2 +- samlidp/session.go | 2 +- samlidp/util.go | 2 +- samlsp/error.go | 2 +- samlsp/fetch_metadata.go | 2 +- samlsp/middleware.go | 2 +- samlsp/middleware_test.go | 4 ++-- samlsp/new.go | 2 +- samlsp/request_tracker_cookie.go | 2 +- samlsp/request_tracker_jwt.go | 2 +- samlsp/session.go | 2 +- samlsp/session_cookie.go | 2 +- samlsp/session_cookie_test.go | 2 +- samlsp/session_jwt.go | 2 +- samlsp/util.go | 2 +- service_provider.go | 2 +- service_provider_test.go | 2 +- 29 files changed, 41 insertions(+), 58 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1392c902..81b25e1b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -44,7 +44,7 @@ linters: - varcheck # Finds unused global variables and constants [fast: true, auto-fix: false] linters-settings: goimports: - local-prefixes: github.com/crewjam/saml + local-prefixes: github.com/aporcupine/saml govet: disable: - shadow diff --git a/README.md b/README.md index 71f24786..05ea5f61 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # SAML -[![](https://godoc.org/github.com/crewjam/saml?status.svg)](http://godoc.org/github.com/crewjam/saml) +[![](https://godoc.org/github.com/aporcupine/saml?status.svg)](http://godoc.org/github.com/aporcupine/saml) -![Build Status](https://github.com/crewjam/saml/workflows/Presubmit/badge.svg) +![Build Status](https://github.com/aporcupine/saml/workflows/Presubmit/badge.svg) Package saml contains a partial implementation of the SAML standard in golang. SAML is a standard for identity federation, i.e. either allowing a third party to authenticate your users or allowing third parties to rely on us to authenticate their users. @@ -54,7 +54,7 @@ import ( "net/http" "net/url" - "github.com/crewjam/saml/samlsp" + "github.com/aporcupine/saml/samlsp" ) func hello(w http.ResponseWriter, r *http.Request) { diff --git a/example/idp/idp.go b/example/idp/idp.go index 6069d379..e59d0646 100644 --- a/example/idp/idp.go +++ b/example/idp/idp.go @@ -10,8 +10,8 @@ import ( "github.com/zenazn/goji" "golang.org/x/crypto/bcrypt" - "github.com/crewjam/saml/logger" - "github.com/crewjam/saml/samlidp" + "github.com/aporcupine/saml/logger" + "github.com/aporcupine/saml/samlidp" ) var key = func() crypto.PrivateKey { diff --git a/example/service.go b/example/service.go index c153b65f..76c6bd6c 100644 --- a/example/service.go +++ b/example/service.go @@ -19,7 +19,7 @@ import ( "github.com/zenazn/goji" "github.com/zenazn/goji/web" - "github.com/crewjam/saml/samlsp" + "github.com/aporcupine/saml/samlsp" ) var links = map[string]Link{} diff --git a/example/trivial/trivial.go b/example/trivial/trivial.go index e8be7cb9..4a1a29fa 100644 --- a/example/trivial/trivial.go +++ b/example/trivial/trivial.go @@ -9,7 +9,7 @@ import ( "net/http" "net/url" - "github.com/crewjam/saml/samlsp" + "github.com/aporcupine/saml/samlsp" ) func hello(w http.ResponseWriter, r *http.Request) { diff --git a/go.mod b/go.mod index 687d29a5..55c0dfdb 100644 --- a/go.mod +++ b/go.mod @@ -1,22 +1,3 @@ -module github.com/crewjam/saml +module saml -go 1.13 - -require ( - github.com/beevik/etree v1.1.0 - github.com/crewjam/httperr v0.2.0 - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 - github.com/form3tech-oss/jwt-go v3.2.2+incompatible - github.com/google/go-cmp v0.5.5 - github.com/jonboulle/clockwork v0.2.2 // indirect - github.com/kr/pretty v0.3.0 - github.com/kr/text v0.2.0 // indirect - github.com/mattermost/xml-roundtrip-validator v0.1.0 - github.com/pkg/errors v0.9.1 // indirect - github.com/russellhaering/goxmldsig v1.1.1 - github.com/zenazn/goji v1.0.1 - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - gotest.tools v2.2.0+incompatible -) +go 1.16 diff --git a/go.sum b/go.sum index ed97f874..80810704 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -32,6 +33,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/russellhaering/goxmldsig v1.1.0 h1:lK/zeJie2sqG52ZAlPNn1oBBqsIsEKypUUBGpYYF6lk= github.com/russellhaering/goxmldsig v1.1.0/go.mod h1:QK8GhXPB3+AfuCrfo0oRISa9NfzeCpWmxeGnqEpDF9o= diff --git a/identity_provider.go b/identity_provider.go index 20258daf..b3f3d94a 100644 --- a/identity_provider.go +++ b/identity_provider.go @@ -23,8 +23,8 @@ import ( xrv "github.com/mattermost/xml-roundtrip-validator" dsig "github.com/russellhaering/goxmldsig" - "github.com/crewjam/saml/logger" - "github.com/crewjam/saml/xmlenc" + "github.com/aporcupine/saml/logger" + "github.com/aporcupine/saml/xmlenc" ) // Session represents a user session. It is returned by the diff --git a/identity_provider_test.go b/identity_provider_test.go index 69840f2a..824483b7 100644 --- a/identity_provider_test.go +++ b/identity_provider_test.go @@ -27,9 +27,9 @@ import ( "github.com/beevik/etree" "github.com/form3tech-oss/jwt-go" - "github.com/crewjam/saml/logger" - "github.com/crewjam/saml/testsaml" - "github.com/crewjam/saml/xmlenc" + "github.com/aporcupine/saml/logger" + "github.com/aporcupine/saml/testsaml" + "github.com/aporcupine/saml/xmlenc" ) type IdentityProviderTest struct { diff --git a/saml.go b/saml.go index e559182e..79614cdc 100644 --- a/saml.go +++ b/saml.go @@ -11,7 +11,7 @@ // // Version 0.4.0 introduces a few breaking changes to the _samlsp_ package in order to make the package more extensible, and to clean up the interfaces a bit. The default behavior remains the same, but you can now provide interface implementations of _RequestTracker_ (which tracks pending requests), _Session_ (which handles maintaining a session) and _OnError_ which handles reporting errors. // -// Public fields of _samlsp.Middleware_ have changed, so some usages may require adjustment. See [issue 231](https://github.com/crewjam/saml/issues/231) for details. +// Public fields of _samlsp.Middleware_ have changed, so some usages may require adjustment. See [issue 231](https://github.com/aporcupine/saml/issues/231) for details. // // The option to provide an IDP metadata URL has been deprecated. Instead, we recommend that you use the `FetchMetadata()` function, or fetch the metadata yourself and use the new `ParseMetadata()` function, and pass the metadata in _samlsp.Options.IDPMetadata_. // @@ -72,7 +72,7 @@ // "net/http" // "net/url" // -// "github.com/crewjam/saml/samlsp" +// "github.com/aporcupine/saml/samlsp" // ) // // func hello(w http.ResponseWriter, r *http.Request) { diff --git a/samlidp/samlidp.go b/samlidp/samlidp.go index f22ca27c..be714bcf 100644 --- a/samlidp/samlidp.go +++ b/samlidp/samlidp.go @@ -11,8 +11,8 @@ import ( "github.com/zenazn/goji/web" - "github.com/crewjam/saml" - "github.com/crewjam/saml/logger" + "github.com/aporcupine/saml" + "github.com/aporcupine/saml/logger" ) // Options represent the parameters to New() for creating a new IDP server diff --git a/samlidp/samlidp_test.go b/samlidp/samlidp_test.go index 8100a8c7..271cc354 100644 --- a/samlidp/samlidp_test.go +++ b/samlidp/samlidp_test.go @@ -18,8 +18,8 @@ import ( "github.com/form3tech-oss/jwt-go" - "github.com/crewjam/saml" - "github.com/crewjam/saml/logger" + "github.com/aporcupine/saml" + "github.com/aporcupine/saml/logger" ) type testRandomReader struct { diff --git a/samlidp/service.go b/samlidp/service.go index 5c2cc659..bfb4f4b1 100644 --- a/samlidp/service.go +++ b/samlidp/service.go @@ -9,7 +9,7 @@ import ( "github.com/zenazn/goji/web" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // Service represents a configured SP for whom this IDP provides authentication services. diff --git a/samlidp/session.go b/samlidp/session.go index ba3bd65b..d9f92799 100644 --- a/samlidp/session.go +++ b/samlidp/session.go @@ -13,7 +13,7 @@ import ( "github.com/zenazn/goji/web" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) var sessionMaxAge = time.Hour diff --git a/samlidp/util.go b/samlidp/util.go index d624be4f..72dd4868 100644 --- a/samlidp/util.go +++ b/samlidp/util.go @@ -9,7 +9,7 @@ import ( xrv "github.com/mattermost/xml-roundtrip-validator" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) func randomBytes(n int) []byte { diff --git a/samlsp/error.go b/samlsp/error.go index 662bce74..216e9611 100644 --- a/samlsp/error.go +++ b/samlsp/error.go @@ -4,7 +4,7 @@ import ( "log" "net/http" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // ErrorFunction is a callback that is invoked to return an error to the diff --git a/samlsp/fetch_metadata.go b/samlsp/fetch_metadata.go index 1ef521ac..5f103ec0 100644 --- a/samlsp/fetch_metadata.go +++ b/samlsp/fetch_metadata.go @@ -12,7 +12,7 @@ import ( "github.com/crewjam/httperr" xrv "github.com/mattermost/xml-roundtrip-validator" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // ParseMetadata parses arbitrary SAML IDP metadata. diff --git a/samlsp/middleware.go b/samlsp/middleware.go index e01bf89e..aa593696 100644 --- a/samlsp/middleware.go +++ b/samlsp/middleware.go @@ -4,7 +4,7 @@ import ( "encoding/xml" "net/http" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // Middleware implements middleware than allows a web application diff --git a/samlsp/middleware_test.go b/samlsp/middleware_test.go index 48b92d9d..1d1e0673 100644 --- a/samlsp/middleware_test.go +++ b/samlsp/middleware_test.go @@ -23,8 +23,8 @@ import ( is "gotest.tools/assert/cmp" "gotest.tools/golden" - "github.com/crewjam/saml" - "github.com/crewjam/saml/testsaml" + "github.com/aporcupine/saml" + "github.com/aporcupine/saml/testsaml" ) type MiddlewareTest struct { diff --git a/samlsp/new.go b/samlsp/new.go index 33397435..1bb0b7df 100644 --- a/samlsp/new.go +++ b/samlsp/new.go @@ -9,7 +9,7 @@ import ( dsig "github.com/russellhaering/goxmldsig" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // Options represents the parameters for creating a new middleware diff --git a/samlsp/request_tracker_cookie.go b/samlsp/request_tracker_cookie.go index d9189f63..140c4375 100644 --- a/samlsp/request_tracker_cookie.go +++ b/samlsp/request_tracker_cookie.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) var _ RequestTracker = CookieRequestTracker{} diff --git a/samlsp/request_tracker_jwt.go b/samlsp/request_tracker_jwt.go index c7abf4cb..da841e96 100644 --- a/samlsp/request_tracker_jwt.go +++ b/samlsp/request_tracker_jwt.go @@ -7,7 +7,7 @@ import ( "github.com/form3tech-oss/jwt-go" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) var defaultJWTSigningMethod = jwt.SigningMethodRS256 diff --git a/samlsp/session.go b/samlsp/session.go index cd1da5d6..1568f5e7 100644 --- a/samlsp/session.go +++ b/samlsp/session.go @@ -5,7 +5,7 @@ import ( "errors" "net/http" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) // Session is an interface implemented to contain a session. diff --git a/samlsp/session_cookie.go b/samlsp/session_cookie.go index 4d557eee..025cf6c6 100644 --- a/samlsp/session_cookie.go +++ b/samlsp/session_cookie.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) const defaultSessionCookieName = "token" diff --git a/samlsp/session_cookie_test.go b/samlsp/session_cookie_test.go index ef594ee2..15ab4c37 100644 --- a/samlsp/session_cookie_test.go +++ b/samlsp/session_cookie_test.go @@ -8,7 +8,7 @@ import ( "gotest.tools/assert" is "gotest.tools/assert/cmp" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) func TestCookieSameSite(t *testing.T) { diff --git a/samlsp/session_jwt.go b/samlsp/session_jwt.go index 2207cc8e..c3f8aa27 100644 --- a/samlsp/session_jwt.go +++ b/samlsp/session_jwt.go @@ -8,7 +8,7 @@ import ( "github.com/form3tech-oss/jwt-go" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) const ( diff --git a/samlsp/util.go b/samlsp/util.go index e1fa69ae..f808cc1b 100644 --- a/samlsp/util.go +++ b/samlsp/util.go @@ -3,7 +3,7 @@ package samlsp import ( "io" - "github.com/crewjam/saml" + "github.com/aporcupine/saml" ) func randomBytes(n int) []byte { diff --git a/service_provider.go b/service_provider.go index 3c7b94f4..881a380d 100644 --- a/service_provider.go +++ b/service_provider.go @@ -23,7 +23,7 @@ import ( dsig "github.com/russellhaering/goxmldsig" "github.com/russellhaering/goxmldsig/etreeutils" - "github.com/crewjam/saml/xmlenc" + "github.com/aporcupine/saml/xmlenc" ) // NameIDFormat is the format of the id diff --git a/service_provider_test.go b/service_provider_test.go index 72d95070..2862cdf5 100644 --- a/service_provider_test.go +++ b/service_provider_test.go @@ -21,7 +21,7 @@ import ( "github.com/beevik/etree" dsig "github.com/russellhaering/goxmldsig" - "github.com/crewjam/saml/testsaml" + "github.com/aporcupine/saml/testsaml" ) type ServiceProviderTest struct {