forked from ebhomengo/niki
13 lines
398 B
Go
13 lines
398 B
Go
package claim
|
|
|
|
import (
|
|
"git.gocasts.ir/ebhomengo/niki/config"
|
|
authservice "git.gocasts.ir/ebhomengo/niki/service/auth/benefactor"
|
|
"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)
|
|
}
|