func (u *User) IDForProvider(provider string) string {
	id := u.ProviderCredentials()[provider].Get(common.CredentialsKeyID).Data()
	switch id.(type) {
	case string:
		return id.(string)
	case float64:
		return strconv.FormatFloat(id.(float64), 'f', 0, 64)
	}
	return ""
}
IDForProvider gets the ID value for the specified provider name for
this user from the ProviderCredentials data.
package facebook
import (
	"github.com/stretchr/gomniauth/common"
	"github.com/stretchr/objx"
	"strconv"
)
const (
	facebookKeyID         string = "id"
	facebookKeyName       string = "name"
	facebookKeyNickname   string = "username"
	facebookKeyEmail      string = "email"
	facebookKeyPictureUrl string = "picture.data.url"
)
type User struct {
	data objx.Map
}
func NewUser(data objx.Map, creds *common.Credentials, provider common.Provider) *User {
	user := &User{data}
	creds.Set(common.CredentialsKeyID, data[facebookKeyID])
	user.data[common.UserKeyProviderCredentials] = map[string]*common.Credentials{
		provider.Name(): creds,
	}
	return user
}
func (u *User) Email() string {
	return u.Data().Get(facebookKeyEmail).Str()
}
func (u *User) Name() string {
	return u.Data().Get(facebookKeyName).Str()
}
func (u *User) Nickname() string {
	return u.Data().Get(facebookKeyNickname).Str()
}
func (u *User) AvatarURL() string {
	return u.Data().Get(facebookKeyPictureUrl).Str()
}
func (u *User) ProviderCredentials() map[string]*common.Credentials {
	return u.Data().Get(common.UserKeyProviderCredentials).Data().(map[string]*common.Credentials)
}