From fe8b5a6e4cd28d1f4c6f611e46388ff1682a4673 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Thu, 8 Jan 2026 15:46:01 -0500 Subject: [PATCH] refactor(server): migrate from ucan-wg to code.sonr.org/go/ucan --- toolkit/server/bearer/bearer.go | 2 +- toolkit/server/bearer/bearer_test.go | 6 +++--- toolkit/server/exectx/middlewares.go | 4 ++-- toolkit/server/exectx/middlewares_test.go | 8 ++++---- toolkit/server/exectx/ucanctx.go | 16 ++++++++-------- toolkit/server/exectx/ucanctx_test.go | 16 ++++++++-------- toolkit/server/extargs/custom.go | 4 ++-- toolkit/server/extargs/custom_test.go | 4 ++-- toolkit/server/extargs/http.go | 6 +++--- toolkit/server/extargs/http_test.go | 12 ++++++------ 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/toolkit/server/bearer/bearer.go b/toolkit/server/bearer/bearer.go index 8328330..ce80dbb 100644 --- a/toolkit/server/bearer/bearer.go +++ b/toolkit/server/bearer/bearer.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "github.com/ucan-wg/go-ucan/pkg/container" + "code.sonr.org/go/ucan/pkg/container" ) var ErrNoUcan = fmt.Errorf("no ucan") diff --git a/toolkit/server/bearer/bearer_test.go b/toolkit/server/bearer/bearer_test.go index 23c5b03..8d68f70 100644 --- a/toolkit/server/bearer/bearer_test.go +++ b/toolkit/server/bearer/bearer_test.go @@ -4,11 +4,11 @@ import ( "net/http" "testing" - _ "github.com/MetaMask/go-did-it/verifiers/did-key" + _ "code.sonr.org/go/did-it/verifiers/did-key" "github.com/stretchr/testify/require" - "github.com/ucan-wg/go-ucan/pkg/container" - "github.com/ucan-wg/go-ucan/pkg/container/containertest" + "code.sonr.org/go/ucan/pkg/container" + "code.sonr.org/go/ucan/pkg/container/containertest" ) func TestHTTPBearer(t *testing.T) { diff --git a/toolkit/server/exectx/middlewares.go b/toolkit/server/exectx/middlewares.go index b46969f..a64f3b3 100644 --- a/toolkit/server/exectx/middlewares.go +++ b/toolkit/server/exectx/middlewares.go @@ -4,9 +4,9 @@ import ( "errors" "net/http" - "github.com/MetaMask/go-did-it" + "code.sonr.org/go/did-it" - "github.com/ucan-wg/go-ucan/toolkit/server/bearer" + "code.sonr.org/go/ucan/toolkit/server/bearer" ) // ExtractMW returns an HTTP middleware tasked with: diff --git a/toolkit/server/exectx/middlewares_test.go b/toolkit/server/exectx/middlewares_test.go index 08c6865..9b40a96 100644 --- a/toolkit/server/exectx/middlewares_test.go +++ b/toolkit/server/exectx/middlewares_test.go @@ -6,13 +6,13 @@ import ( "net/http/httptest" "testing" - "github.com/MetaMask/go-did-it/didtest" + "code.sonr.org/go/did-it/didtest" "github.com/ipfs/go-cid" "github.com/stretchr/testify/require" - "github.com/ucan-wg/go-ucan/pkg/container" - "github.com/ucan-wg/go-ucan/token/delegation" - "github.com/ucan-wg/go-ucan/token/invocation" + "code.sonr.org/go/ucan/pkg/container" + "code.sonr.org/go/ucan/token/delegation" + "code.sonr.org/go/ucan/token/invocation" ) func TestExtractMW(t *testing.T) { diff --git a/toolkit/server/exectx/ucanctx.go b/toolkit/server/exectx/ucanctx.go index 11d99d0..21ed6f6 100644 --- a/toolkit/server/exectx/ucanctx.go +++ b/toolkit/server/exectx/ucanctx.go @@ -9,14 +9,14 @@ import ( "github.com/ipfs/go-cid" "github.com/ipld/go-ipld-prime/datamodel" - "github.com/ucan-wg/go-ucan/pkg/args" - "github.com/ucan-wg/go-ucan/pkg/command" - "github.com/ucan-wg/go-ucan/pkg/container" - "github.com/ucan-wg/go-ucan/pkg/meta" - "github.com/ucan-wg/go-ucan/pkg/policy" - "github.com/ucan-wg/go-ucan/token/delegation" - "github.com/ucan-wg/go-ucan/token/invocation" - "github.com/ucan-wg/go-ucan/toolkit/server/extargs" + "code.sonr.org/go/ucan/pkg/args" + "code.sonr.org/go/ucan/pkg/command" + "code.sonr.org/go/ucan/pkg/container" + "code.sonr.org/go/ucan/pkg/meta" + "code.sonr.org/go/ucan/pkg/policy" + "code.sonr.org/go/ucan/token/delegation" + "code.sonr.org/go/ucan/token/invocation" + "code.sonr.org/go/ucan/toolkit/server/extargs" ) var _ delegation.Loader = &UcanCtx{} diff --git a/toolkit/server/exectx/ucanctx_test.go b/toolkit/server/exectx/ucanctx_test.go index 7ae8a58..2bd0974 100644 --- a/toolkit/server/exectx/ucanctx_test.go +++ b/toolkit/server/exectx/ucanctx_test.go @@ -8,19 +8,19 @@ import ( "testing" "time" - "github.com/MetaMask/go-did-it/didtest" + "code.sonr.org/go/did-it/didtest" "github.com/ipfs/go-cid" "github.com/ipld/go-ipld-prime/datamodel" "github.com/ipld/go-ipld-prime/fluent/qp" "github.com/stretchr/testify/require" - "github.com/ucan-wg/go-ucan/pkg/command" - "github.com/ucan-wg/go-ucan/pkg/container" - "github.com/ucan-wg/go-ucan/pkg/policy" - "github.com/ucan-wg/go-ucan/pkg/policy/literal" - "github.com/ucan-wg/go-ucan/token/delegation" - "github.com/ucan-wg/go-ucan/token/invocation" - "github.com/ucan-wg/go-ucan/toolkit/server/exectx" + "code.sonr.org/go/ucan/pkg/command" + "code.sonr.org/go/ucan/pkg/container" + "code.sonr.org/go/ucan/pkg/policy" + "code.sonr.org/go/ucan/pkg/policy/literal" + "code.sonr.org/go/ucan/token/delegation" + "code.sonr.org/go/ucan/token/invocation" + "code.sonr.org/go/ucan/toolkit/server/exectx" ) const ( diff --git a/toolkit/server/extargs/custom.go b/toolkit/server/extargs/custom.go index 51accd1..8bd0ce7 100644 --- a/toolkit/server/extargs/custom.go +++ b/toolkit/server/extargs/custom.go @@ -9,8 +9,8 @@ import ( "github.com/ipld/go-ipld-prime/fluent/qp" "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/ucan-wg/go-ucan/pkg/args" - "github.com/ucan-wg/go-ucan/pkg/policy" + "code.sonr.org/go/ucan/pkg/args" + "code.sonr.org/go/ucan/pkg/policy" ) type CustomExtArgs struct { diff --git a/toolkit/server/extargs/custom_test.go b/toolkit/server/extargs/custom_test.go index 86d53cd..128b928 100644 --- a/toolkit/server/extargs/custom_test.go +++ b/toolkit/server/extargs/custom_test.go @@ -8,8 +8,8 @@ import ( "github.com/ipld/go-ipld-prime/fluent/qp" "github.com/stretchr/testify/require" - "github.com/ucan-wg/go-ucan/pkg/policy" - "github.com/ucan-wg/go-ucan/pkg/policy/literal" + "code.sonr.org/go/ucan/pkg/policy" + "code.sonr.org/go/ucan/pkg/policy/literal" ) func ExampleCustomExtArgs() { diff --git a/toolkit/server/extargs/http.go b/toolkit/server/extargs/http.go index 7c354cd..a791dfc 100644 --- a/toolkit/server/extargs/http.go +++ b/toolkit/server/extargs/http.go @@ -14,9 +14,9 @@ import ( "github.com/ipld/go-ipld-prime/node/basicnode" "github.com/multiformats/go-multihash" - "github.com/ucan-wg/go-ucan/pkg/args" - "github.com/ucan-wg/go-ucan/pkg/policy" - "github.com/ucan-wg/go-ucan/token/invocation" + "code.sonr.org/go/ucan/pkg/args" + "code.sonr.org/go/ucan/pkg/policy" + "code.sonr.org/go/ucan/token/invocation" ) // HttpArgsKey is the key in the args, used for: diff --git a/toolkit/server/extargs/http_test.go b/toolkit/server/extargs/http_test.go index 3c1dbd6..ad728d7 100644 --- a/toolkit/server/extargs/http_test.go +++ b/toolkit/server/extargs/http_test.go @@ -5,15 +5,15 @@ import ( "net/http/httptest" "testing" - "github.com/MetaMask/go-did-it/didtest" + "code.sonr.org/go/did-it/didtest" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/require" - "github.com/ucan-wg/go-ucan/pkg/args" - "github.com/ucan-wg/go-ucan/pkg/command" - "github.com/ucan-wg/go-ucan/pkg/policy" - "github.com/ucan-wg/go-ucan/pkg/policy/literal" - "github.com/ucan-wg/go-ucan/token/invocation" + "code.sonr.org/go/ucan/pkg/args" + "code.sonr.org/go/ucan/pkg/command" + "code.sonr.org/go/ucan/pkg/policy" + "code.sonr.org/go/ucan/pkg/policy/literal" + "code.sonr.org/go/ucan/token/invocation" ) func TestHttp(t *testing.T) {