Skip to content

Commit 2f32c3a

Browse files
wallebradfitz
authored andcommitted
mailchimp: add MailChimp provider
Added MailChimp endpoints as per documentation: http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/ Add MailChimp to brokenAuthHeadersProviders since they require the client id and secret as query parameters. Fixes golang#272 Change-Id: I155d0c7e34f13477ac87b225e9a278d79c3a2a44 Reviewed-on: https://go-review.googlesource.com/96635 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent d7d6489 commit 2f32c3a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

internal/token.go

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ var brokenAuthHeaderProviders = []string{
103103
"https://api.twitch.tv/",
104104
"https://app.box.com/",
105105
"https://connect.stripe.com/",
106+
"https://login.mailchimp.com/",
106107
"https://login.microsoftonline.com/",
107108
"https://login.salesforce.com/",
108109
"https://login.windows.net",

mailchimp/mailchimp.go

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2018 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Package mailchimp provides constants for using OAuth2 to access MailChimp.
6+
package mailchimp // import "golang.org/x/oauth2/mailchimp"
7+
8+
import (
9+
"golang.org/x/oauth2"
10+
)
11+
12+
// Endpoint is MailChimp's OAuth 2.0 endpoint.
13+
// See http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/
14+
var Endpoint = oauth2.Endpoint{
15+
AuthURL: "https://login.mailchimp.com/oauth2/authorize",
16+
TokenURL: "https://login.mailchimp.com/oauth2/token",
17+
}

0 commit comments

Comments
 (0)