google oauth2如何获取服务帐户的私钥 [英] google oauth2 how to get private key for service account
问题描述
有人可以告诉我如何从服务帐户的谷歌云控制台下载证书。我正在寻找各地。我已经下载了应用程序授权凭证client_secret.json
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"
client_secret.json有一个密钥client_x509_cert_url,它将我带到嵌入了2个证书的json文件在里面。这是证书吗?如果他们是如何在java代码中使用它。
我在这里有点迷失。
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.
推荐答案
更新(2013-12-18):
Google今天早上更新了云端控制台。生成私钥的新说明如下:
Update (2013-12-18): Google updated the Cloud Console this morning. The new instructions for generating a private key are:
- 打开您的项目。
- 转到 API& Auth。
- 转到凭证。
- 点击创建新客户ID。
- 选择服务帐户。
- Open your project.
- Go to "APIs & Auth".
- Go to "Credentials".
- Click "Create new client ID".
- Select "Service Account".
过时的说明(2013-12-18之前):
以下是如何在Google Cloud Console中生成私钥:
Obsolete instructions (prior to 2013-12-18): Here is how to generate a private key in the Google Cloud Console:
- 打开您的项目。
- 转到API& Auth。
- 转到已注册的应用。
- 点击注册应用。
- 选择Web应用程序。
- 打开证书。
- 单击生成证书。
- 点击下载私钥。
- 点击查看公钥以关闭对话框。
- Open your project.
- Go to "APIs & Auth".
- Go to "Registered apps".
- Click "Register app".
- Select "Web application".
- Open "Certificate".
- Click "Generate Certificate".
- Click "Download Private Key".
- Click "View Public Key" to dismiss the dialog.
JSON中的URL会将您带到一个公共URL,在该公共URL中可以找到相应私钥的公钥 - 这不是您要查找的内容。
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.
这篇关于google oauth2如何获取服务帐户的私钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!