简体   繁体   English

OAuth使用Google令牌访问Jira?

[英]OAuth access Jira with google token?

I am using this npm to authenticate through Google to the system. 我正在使用此npm通过Google向系统进行身份验证。 I have Jira atlassian, that uses Google to authenticate. 我有Jira Atlassian,它使用Google进行身份验证。

Question

Is it possible to use the token that I received from Google, and use it to authenticate into Jira's API of that user to gather information from Jira such as grabbing all tasks assigned to me, and such? 是否可以使用我从Google收到的令牌,并使用该令牌对该用户的Jira API进行身份验证,以从Jira收集信息,例如获取分配给我的所有任务等?

Or do I have to make OAuth specify for Jira ? 还是我必须为Jira指定OAuth?

Of course you can do this, that is the point of delegated authentication. 当然,您可以执行此操作,这就是委托身份验证的重点。 Google will send you an authentication token when user will logs in. I never work with google. 用户登录时,Google会向您发送身份验证令牌。我从不与google合作。 I always used keyclock (3 part OAuth provider). 我一直使用keyclock(3部分OAuth提供程序)。 But that is a beauty of a spec it should work everywhere the same. 但这是一种规范的美,它应该在所有地方都可以使用。

It will be save in the cookie. 它将保存在cookie中。 It will have o form of JWT. 它将具有JWT的形式。

You have to attache is token to the request that you send to the jira API. 您必须将令牌附加到发送到jira API的请求中。 You can try this with curl first 您可以先用curl尝试一下

curl -i http://dev.myapp.com/api/jira ... \
-H "Authorization: Bearer Ym9zY236Ym9zY28=afsfdsf...."

You can find the token when looking at the network traffic in your browser. 在浏览器中查看网络流量时,您可以找到令牌。

Let me know how it went. 让我知道进展如何。 And if I can help further. 如果我能提供进一步的帮助。 I have a pretty good understanding of the OpenIDconnect and OAuth 2.0 standards. 我对OpenIDconnect和OAuth 2.0标准有很好的了解。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 google oauth2 中使用刷新令牌获取访问令牌? - How to get access token using refresh token in google oauth2? Google OAuth使用刷新令牌获取新的访问令牌 - Google OAuth getting new access token with refresh token 生成 oauth 访问令牌后,如何使用传递访问令牌在 Jira Server 中使用 Rest Api。 使用 Nodejs(请求库) - How to use pass access token for using Rest Api in Jira Server after generating oauth access token. Using Nodejs(request library) Google oAuth2 访问令牌:“invalid_grant” - Google oAuth2 Access Token: "invalid_grant" Google OAuth-验证访问令牌时JSON不正确 - Google OAuth - Incorrect JSON while Validating Access Token Google OAuth2:尝试访问 Google Drive API 时,“错误:没有访问、刷新令牌或 API 密钥已设置” - Google OAuth2: "Error: No access, refresh token or API key is set" when trying to access Google Drive API 如何从password.js中的刷新令牌获取新的Google oauth访问令牌 - How to get a new Google oauth access token from refresh token in passportjs 如何使用节点 js 客户端库使用刷新令牌谷歌 oAuth2 获取新的访问令牌 - How to get a new access token using refresh token google oAuth2 using node js client library 使用 google oauth2 节点库,无法使用刷新令牌获取新的访问令牌 - Using google oauth2 node library, can't get new access token with refresh token 如何使用 google oauth2 撤销 google drive 登录的访问令牌? - How to revoke access token of google drive login using google oauth2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM