2
0

claims.go 343 B

1234567891011121314
  1. package model
  2. import "github.com/mitchellh/mapstructure"
  3. type Claims struct {
  4. Email string `mapstructure:"email"`
  5. Sub string `mapstructure:"sub"`
  6. Scope string `mapstructure:"scope"`
  7. SessionId string `mapstructure:"sid"`
  8. }
  9. func (c *Claims) Unmarshall(source map[string]any) error {
  10. return mapstructure.Decode(source, c)
  11. }