Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

java - google oauth2 how to get private key for service account

Can somebody please tell me how do I download the certificate from google cloud console for the service account. I being searching all over the place. I have downloaded the applications authorization credential "client_secret.json"

The client_secret.json has a key "client_x509_cert_url" key which takes me to the json file which has 2 certificates embedded in it. Are this the certificate? if they are how do I use it in java code. I am bit lost over here.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Update (2013-12-18): Google updated the Cloud Console this morning. The new instructions for generating a private key are:

  1. Open your project.
  2. Go to "APIs & Auth".
  3. Go to "Credentials".
  4. Click "Create new client ID".
  5. Select "Service Account".

Obsolete instructions (prior to 2013-12-18): Here is how to generate a private key in the Google Cloud Console:

  1. Open your project.
  2. Go to "APIs & Auth".
  3. Go to "Registered apps".
  4. Click "Register app".
  5. Select "Web application".
  6. Open "Certificate".
  7. Click "Generate Certificate".
  8. Click "Download Private Key".
  9. Click "View Public Key" to dismiss the dialog.

The URL in the JSON instead takes you to a public URL where the public key for corresponding private key can be found - that's not what you are looking for.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...