Beispiel #1
0
func (a *Account) Provider() *providers.Provider {
	if a.provider != nil {
		return a.provider
	}

	p, _ := providers.New(a.ProviderCode(), "", "")
	a.provider = p
	return p

}
Beispiel #2
0
func tmp_new_provider(typ string) *providers.Provider {
	var (
		p   *providers.Provider
		err error
	)

	switch typ {
	case "go":
		p, err = providers.New(typ, "536228200101.apps.googleusercontent.com", "TvF9KQB6iMMEjj5oagTEsdqY")
	case "gh":
		p, err = providers.New(typ, "75d06562f297cf2cc0a5", "00e3c788d083c12678a29bf87e0d374c6a1d5bc2")
	case "fb":
		p, err = providers.New(typ, "303274556491300", "4bdf767541d8fab54f149ebceb0b114c")
	default:
		p, err = providers.New(typ, "", "")
	}

	if err != nil {
		panic(err)
	}

	return p
}