oauth2_proxy/providers/providers.go
2015-03-31 09:34:50 -04:00

19 lines
322 B
Go

package providers
import (
"github.com/bitly/go-simplejson"
)
type Provider interface {
Data() *ProviderData
GetEmailAddress(auth_response *simplejson.Json,
access_token string) (string, error)
}
func New(provider string, p *ProviderData) Provider {
switch provider {
default:
return NewGoogleProvider(p)
}
}