1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-09-16 09:06:20 +02:00

Group constants.

This commit is contained in:
Aaron
2015-08-03 15:25:06 -07:00
parent 16200f8896
commit 0ae4765ee3

View File

@@ -8,8 +8,9 @@ import (
"gopkg.in/authboss.v0"
)
var (
googleInfoEndpoint = `https://www.googleapis.com/userinfo/v2/me`
const (
googleInfoEndpoint = `https://www.googleapis.com/userinfo/v2/me`
facebookInfoEndpoint = `https://graph.facebook.com/me?fields=name,email`
)
type googleMeResponse struct {
@@ -47,10 +48,6 @@ type facebookMeResponse struct {
Name string `json:"name"`
}
const (
facebookInfoEndpoint = "https://graph.facebook.com/me?fields=name,email"
)
// Facebook is a callback appropriate for use with Facebook's OAuth2 configuration.
func Facebook(cfg oauth2.Config, token *oauth2.Token) (authboss.Attributes, error) {
client := cfg.Client(oauth2.NoContext, token)