package model import "github.com/mitchellh/mapstructure" type Claims struct { Email string `mapstructure:"email"` Sub string `mapstructure:"sub"` Scope string `mapstructure:"scope"` SessionId string `mapstructure:"sid"` } func (c *Claims) Unmarshall(source map[string]any) error { return mapstructure.Decode(source, c) }