forked from Mirrors/oauth2
google: Update godocs to reflect recent GCP front-end changes.
Updated references to the API manager to reflect the new stand-alone API manager at http://console.developers.google.com. Change-Id: I156cce7b844850a560bfbf2b64fb0d8da5edaefe Reviewed-on: https://go-review.googlesource.com/22706 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9ef2eddcc6
commit
f6a14f0423
|
@ -37,9 +37,10 @@ const JWTTokenURL = "https://accounts.google.com/o/oauth2/token"
|
||||||
|
|
||||||
// ConfigFromJSON uses a Google Developers Console client_credentials.json
|
// ConfigFromJSON uses a Google Developers Console client_credentials.json
|
||||||
// file to construct a config.
|
// file to construct a config.
|
||||||
// client_credentials.json can be downloadable from https://console.developers.google.com,
|
// client_credentials.json can be downloaded from
|
||||||
// under "APIs & Auth" > "Credentials". Download the Web application credentials in the
|
// https://console.developers.google.com, under "Credentials". Download the Web
|
||||||
// JSON format and provide the contents of the file as jsonKey.
|
// application credentials in the JSON format and provide the contents of the
|
||||||
|
// file as jsonKey.
|
||||||
func ConfigFromJSON(jsonKey []byte, scope ...string) (*oauth2.Config, error) {
|
func ConfigFromJSON(jsonKey []byte, scope ...string) (*oauth2.Config, error) {
|
||||||
type cred struct {
|
type cred struct {
|
||||||
ClientID string `json:"client_id"`
|
ClientID string `json:"client_id"`
|
||||||
|
@ -81,8 +82,8 @@ func ConfigFromJSON(jsonKey []byte, scope ...string) (*oauth2.Config, error) {
|
||||||
|
|
||||||
// JWTConfigFromJSON uses a Google Developers service account JSON key file to read
|
// JWTConfigFromJSON uses a Google Developers service account JSON key file to read
|
||||||
// the credentials that authorize and authenticate the requests.
|
// the credentials that authorize and authenticate the requests.
|
||||||
// Create a service account on "Credentials" page under "APIs & Auth" for your
|
// Create a service account on "Credentials" for your project at
|
||||||
// project at https://console.developers.google.com to download a JSON key file.
|
// https://console.developers.google.com to download a JSON key file.
|
||||||
func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) {
|
func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) {
|
||||||
var key struct {
|
var key struct {
|
||||||
Email string `json:"client_email"`
|
Email string `json:"client_email"`
|
||||||
|
|
Loading…
Reference in New Issue