func (u *User) IsAdmin() bool {
	return u.BoolAttr(adminAttr)
}
IsAdmin is a shortcut to get admin attribute
package token
import (
	"context"
	"encoding/hex"
	"fmt"
	"hash"
	"hash/crc64"
	"io"
	"net/http"
	"regexp"
	"github.com/pkg/errors"
)
var reValidSha = regexp.MustCompile("^[a-fA-F0-9]{40}$")
var reValidCrc64 = regexp.MustCompile("^[a-fA-F0-9]{16}$")
const (
	adminAttr          = "admin"        
	paidSubscriberAttr = "is_paid_sub"  
)
type User struct {
	Name     string `json:"name"`
	ID       string `json:"id"`
	Picture  string `json:"picture"`
	Audience string `json:"aud,omitempty"`
	IP         string                 `json:"ip,omitempty"`
	Email      string                 `json:"email,omitempty"`
	Attributes map[string]interface{} `json:"attrs,omitempty"`
	Role       string                 `json:"role,omitempty"`
}
func (u *User) SetBoolAttr(key string, val bool) {
	if u.Attributes == nil {
		u.Attributes = map[string]interface{}{}
	}
	u.Attributes[key] = val
}
func (u *User) SetStrAttr(key, val string) {
	if u.Attributes == nil {
		u.Attributes = map[string]interface{}{}
	}
	u.Attributes[key] = val
}
func (u *User) BoolAttr(key string) bool {
	r, ok := u.Attributes[key].(bool)
	if !ok {
		return false
	}
	return r
}
func (u *User) StrAttr(key string) string {
	r, ok := u.Attributes[key].(string)
	if !ok {
		return ""
	}
	return r
}
func (u *User) SetAdmin(val bool) {
	u.SetBoolAttr(adminAttr, val)
}