mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
refactor: move Motr API to state package
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
package handlers
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package handlers
|
||||||
+7
-7
@@ -15,7 +15,7 @@ import (
|
|||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
promise "github.com/nlepage/go-js-promise"
|
promise "github.com/nlepage/go-js-promise"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/cmd/motr/handlers"
|
"github.com/onsonr/sonr/cmd/motr/state"
|
||||||
"github.com/onsonr/sonr/internal/session"
|
"github.com/onsonr/sonr/internal/session"
|
||||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||||
)
|
)
|
||||||
@@ -30,13 +30,13 @@ func main() {
|
|||||||
|
|
||||||
func registerState(e *echo.Echo) {
|
func registerState(e *echo.Echo) {
|
||||||
g := e.Group("state")
|
g := e.Group("state")
|
||||||
g.POST("/login/:identifier", handlers.HandleCredentialAssertion)
|
g.POST("/login/:identifier", state.HandleCredentialAssertion)
|
||||||
// g.GET("/discovery", state.GetDiscovery)
|
// g.GET("/discovery", state.GetDiscovery)
|
||||||
g.GET("/jwks", handlers.GetJWKS)
|
g.GET("/jwks", state.GetJWKS)
|
||||||
g.GET("/token", handlers.GetToken)
|
g.GET("/token", state.GetToken)
|
||||||
g.POST("/:origin/grant/:subject", handlers.GrantAuthorization)
|
g.POST("/:origin/grant/:subject", state.GrantAuthorization)
|
||||||
g.POST("/register/:subject", handlers.HandleCredentialCreation)
|
g.POST("/register/:subject", state.HandleCredentialCreation)
|
||||||
g.POST("/register/:subject/check", handlers.CheckSubjectIsValid)
|
g.POST("/register/:subject/check", state.CheckSubjectIsValid)
|
||||||
}
|
}
|
||||||
|
|
||||||
func registerViews(e *echo.Echo) {
|
func registerViews(e *echo.Echo) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package state
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package state
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
FROM scratch
|
||||||
|
ENTRYPOINT ["/hway"]
|
||||||
|
COPY hway /
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
FROM scratch
|
|
||||||
ENTRYPOINT ["/motr"]
|
|
||||||
COPY motr /
|
|
||||||
Reference in New Issue
Block a user