feat: totp close #9

This commit is contained in:
naiba
2021-01-04 21:46:18 +08:00
committed by dushixiang
parent 2d160c70f9
commit 3bf8fe6684
11 changed files with 213 additions and 49 deletions

View File

@ -1,11 +1,12 @@
package api
import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"net/http"
"next-terminal/pkg/global"
"next-terminal/pkg/model"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
const Token = "X-Auth-Token"
@ -35,6 +36,8 @@ func SetupRoutes() *echo.Echo {
e.POST("/logout", LogoutEndpoint)
e.POST("/change-password", ChangePasswordEndpoint)
e.POST("/reset-totp", ResetTOTPEndpoint)
e.POST("/confirm-totp", ConfirmTOTPEndpoint)
e.GET("/info", InfoEndpoint)
users := e.Group("/users")