- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用下面的 API
https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token
获取 access_token 但 access_token 在 1 小时后过期,我需要 refresh_token 但我无法在上述 API 的响应中获取 refresh_token。以上API的响应是
https://www.example.com/#access_token={access_token}&scopes={scopes}&expires_in=3600&token_type=bearer
你可以看到上面的响应中没有或者有没有其他方式获取refresh_token。
我想调用上面的 API 作为 GET 方法。
可以请人帮忙。
谢谢!
最佳答案
在您的浏览器中转到
https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code
使用您的 bitbucket 帐户授权。
之后,您的浏览器将被重定向到
{your_redirect_link}/?code={code}
使用代码在终端中发出另一个请求:
curl -X POST -u "{client_id:secret}"https://bitbucket.org/site/oauth2/access_token -d grant_type=authorization_code -d code={code}
响应看起来像这样:
{
"access_token": "some_long_string",
"scopes": "team webhook account issue wiki pipeline pullrequest project snippet",
"expires_in": 7200,
"refresh_token": "the_string_you_need",
"token_type": "bearer"
}
现在你可以通过请求刷新access_token
curl -X POST -u "{client_id}:{secret}"https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token={refresh_token}
关于bitbucket - 如何获取bitbucket的refresh_token?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49168752/
我正在与一个显然需要 OAuth 身份验证的自定义 APEX 服务进行交互。我可以轻松地对我的应用程序进行身份验证和授权。一切正常。 但是,我收到的访问 token 往往会过期。 当然,我可以通过发送
我有一个使用 oauth2 连接到第三方应用程序的 C# 应用程序。首先,用户被重定向到一个外部应用程序 (ERP),他在其中输入用户名和密码,并生成一个有效期为 1 小时的访问 token 和一个有
我对 refresh_token 有疑问。我完全不明白。我读到我只在登录后第一次获得此 token ,之后不会返回 refresh_token。第一种方法是初始化 gapi: initGp: func
我有一个有两条路由的小型 express 服务器。然后它将 json token 写入文件(我知道非常不安全)。由于某种原因,没有 refresh_token。在文档中有一条评论说 offline f
我将 google API 用于个人项目,因此我的应用没有通过 google 验证。 我完全使用 this我自己的代码示例和登录时生成的 token.json 文件。一切正常,每次我发出请求(每 10
背景 我使用 google-api-python-client django_sample 获得了 Google API 的 access_token . 为了离线访问,我添加了 FLOW.param
我写了一个关于使用 google api 的例子。 Google NodeJS Client library .我遵循了指令集 access_type : 'offline',但是返回的对象不包含 r
我在 IdentityServer 4 中使用 .net 核心。我有一个 Web api 和一个访问 api 上的安全端点的 MVC 应用程序。它的设置与 IdentityServer 快速入门非常相
我正在阅读 OAuth2 规范: https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2 特别是关于 client_credentials 的部分授予
我在Grails 3应用程序中使用Spring Security Rest发出“refresh_token”请求时遇到了一些麻烦。我有一个同时具有Web前端和一些Rest端点的应用程序,其他所有东西似
我正在使用的项目:来自 nuget 的 ImgurNet(来源:https://github.com/0xdeafcafe/ImgurNet) 它似乎需要所有这些参数: { "client_i
我对 refresh_token 流程(http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com)的
您好,我是计算机科学专业的学生,正在 oauth.io 上做一些实验。但我在成功获取代码后获取刷新 token 时遇到问题。获取代码后,我正在编写以下代码行,但它给了我内部服务器错误.. 代码是
我正在使用 omniauth-coinbase和 coinbase-ruby在我的 Rails 应用程序中。 在我的应用程序中,用户通过 Coinbase 登录,Coinbase 生成一个 code,
所以我通过这种方式获得了一个刷新 token ,我可以保留它吗? 如果可以,下次要怎么用才能不用开浏览器? 现在我正在考虑直接创建 OAuth2Credentials 对象,这是正确的方法吗? fro
我将 HWIO Bundle 用于 google api,当我收到来自 google refreshToken = null 的响应时,为什么?如何刷新 token oAuthToken = {HWI
如果用户的 access_token 过期并且用户想保持登录状态,我需要让用户在系统中保持登录状态。如何在 Keycloak 上使用 refresh_token 获取新更新的 access_token
我的 axios 响应中有以下拦截器: window.axios.interceptors.response.use( response => { return response; }
我正在使用 FLask Framework 构建网站 + 后端我在其中使用 Flask-OAuthlib与谷歌进行身份验证。身份验证后,后端需要定期扫描用户的 Gmail。因此,当前用户可以验证我的应
根据 https://groups.google.com/forum/#!forum/oauth2-dev讨论现在在这里。 无论我读了多少书,我都无法理解 google OAuth2 token 的工
我是一名优秀的程序员,十分优秀!