package claim

import (
	"git.gocasts.ir/ebhomengo/niki/config"
	authservice "git.gocasts.ir/ebhomengo/niki/service/auth"
	"github.com/labstack/echo/v4"
)

func GetClaimsFromEchoContext(c echo.Context) *authservice.Claims {
	//nolint:forcetypeassert //defensive programming vs let it crash - log-metric-recover ,...
	return c.Get(config.AuthMiddlewareContextKey).(*authservice.Claims)
}
