mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: move Motr API to state package
This commit is contained in:
parent
75c65228fc
commit
ae56055640
1
cmd/hway/server/handlers/txns.go
Normal file
1
cmd/hway/server/handlers/txns.go
Normal file
@ -0,0 +1 @@
|
||||
package handlers
|
1
cmd/hway/server/handlers/wss.go
Normal file
1
cmd/hway/server/handlers/wss.go
Normal file
@ -0,0 +1 @@
|
||||
package handlers
|
@ -15,7 +15,7 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
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/pkg/nebula/pages"
|
||||
)
|
||||
@ -30,13 +30,13 @@ func main() {
|
||||
|
||||
func registerState(e *echo.Echo) {
|
||||
g := e.Group("state")
|
||||
g.POST("/login/:identifier", handlers.HandleCredentialAssertion)
|
||||
g.POST("/login/:identifier", state.HandleCredentialAssertion)
|
||||
// g.GET("/discovery", state.GetDiscovery)
|
||||
g.GET("/jwks", handlers.GetJWKS)
|
||||
g.GET("/token", handlers.GetToken)
|
||||
g.POST("/:origin/grant/:subject", handlers.GrantAuthorization)
|
||||
g.POST("/register/:subject", handlers.HandleCredentialCreation)
|
||||
g.POST("/register/:subject/check", handlers.CheckSubjectIsValid)
|
||||
g.GET("/jwks", state.GetJWKS)
|
||||
g.GET("/token", state.GetToken)
|
||||
g.POST("/:origin/grant/:subject", state.GrantAuthorization)
|
||||
g.POST("/register/:subject", state.HandleCredentialCreation)
|
||||
g.POST("/register/:subject/check", state.CheckSubjectIsValid)
|
||||
}
|
||||
|
||||
func registerViews(e *echo.Echo) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package handlers
|
||||
package state
|
||||
|
||||
import (
|
||||
"encoding/json"
|
1
cmd/motr/state/manifest.go
Normal file
1
cmd/motr/state/manifest.go
Normal file
@ -0,0 +1 @@
|
||||
package state
|
@ -1,4 +1,4 @@
|
||||
package handlers
|
||||
package state
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
1
cmd/motr/state/wellknown.go
Normal file
1
cmd/motr/state/wellknown.go
Normal file
@ -0,0 +1 @@
|
||||
package state
|
3
deploy/release/hway.Dockerfile
Normal file
3
deploy/release/hway.Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/hway"]
|
||||
COPY hway /
|
@ -1,3 +0,0 @@
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/motr"]
|
||||
COPY motr /
|
Loading…
x
Reference in New Issue
Block a user