mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: add DID-based authentication middleware
This commit is contained in:
+1
-1
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/onsonr/sonr/crypto/ucan"
|
||||
"github.com/onsonr/sonr/pkg/common/didauth/producer"
|
||||
"github.com/onsonr/sonr/pkg/common/ipfs"
|
||||
"github.com/onsonr/sonr/pkg/common/producer"
|
||||
"github.com/onsonr/sonr/pkg/gateway"
|
||||
"github.com/onsonr/sonr/pkg/gateway/config"
|
||||
)
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ import (
|
||||
"syscall/js"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/common/dids"
|
||||
"github.com/onsonr/sonr/pkg/common/didauth/controller"
|
||||
"github.com/onsonr/sonr/pkg/vault"
|
||||
"github.com/onsonr/sonr/pkg/vault/types"
|
||||
)
|
||||
@@ -48,7 +48,7 @@ func main() {
|
||||
|
||||
e := echo.New()
|
||||
e.Use(vault.WasmContextMiddleware)
|
||||
e.Use(dids.Middleware(nil))
|
||||
e.Use(controller.Middleware(nil))
|
||||
vault.RegisterRoutes(e, config)
|
||||
vault.ServeFetch(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user