add user service
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package mw
|
||||
|
||||
import (
|
||||
"astra-api-gateway/handler"
|
||||
"astra-api-gateway/config"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/labstack/echo-jwt/v4"
|
||||
"github.com/labstack/echo/v4"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var JWTMW = echojwt.WithConfig(echojwt.Config{
|
||||
SigningKey: []byte(handler.Key),
|
||||
var JWT_MW = echojwt.WithConfig(echojwt.Config{
|
||||
SigningKey: []byte(config.Env.Server.JWTSecret),
|
||||
Skipper: func(c echo.Context) bool {
|
||||
// Skip authentication for signup and login requests
|
||||
if strings.Contains(c.Path(), "auth") || c.Path() == "/health" {
|
||||
|
||||
Reference in New Issue
Block a user