🐛 Wrong context key in authorization
This commit is contained in:
parent
65b6b4c6a1
commit
2f2a39d93d
@ -3,13 +3,14 @@ package exts
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/hyper"
|
"git.solsynth.dev/hydrogen/dealer/pkg/hyper"
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/internal/directory"
|
"git.solsynth.dev/hydrogen/dealer/pkg/internal/directory"
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AuthMiddleware(c *fiber.Ctx) error {
|
func AuthMiddleware(c *fiber.Ctx) error {
|
||||||
@ -32,7 +33,7 @@ func AuthMiddleware(c *fiber.Ctx) error {
|
|||||||
if newAtk != atk {
|
if newAtk != atk {
|
||||||
SetAuthCookies(c, newAtk, newRtk)
|
SetAuthCookies(c, newAtk, newRtk)
|
||||||
}
|
}
|
||||||
c.Locals("user", acc)
|
c.Locals("p_user", acc)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Next()
|
return c.Next()
|
||||||
|
Loading…
Reference in New Issue
Block a user