Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for signing requests with JWT token #31

Open
nbransby opened this issue Jun 4, 2019 · 4 comments
Open

Support for signing requests with JWT token #31

nbransby opened this issue Jun 4, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@nbransby
Copy link

nbransby commented Jun 4, 2019

According to these docs, if you want to call the API as an connect app you need to pass JWT in the query string or header param:

https://developer.atlassian.com/cloud/bitbucket/authentication-for-apps/

Also to create the JWT token in the first place according to these cdocs you need to include a query string hash: "A query string hash is a signed canonical request for the URI of the API you want to call.":

https://developer.atlassian.com/cloud/bitbucket/understanding-jwt-for-apps/

Does node-bitbucket support this?

@MunifTanjim
Copy link
Owner

Those links are for JIRA.

Does Bitbucket Cloud API supports this?

@nbransby
Copy link
Author

nbransby commented Jun 4, 2019

Yeah the docs are same https://developer.atlassian.com/cloud/bitbucket/authentication-for-apps/. I corrected the links.

Would be cool if you supported auto signing for requests using this lib: https://www.npmjs.com/package/atlassian-jwt

Otherwise we will some how have to get the query string from node-bitbucket so we can create the correct token for the API call

@MunifTanjim MunifTanjim added the enhancement New feature or request label Jun 4, 2019
@MunifTanjim
Copy link
Owner

Before this can be implemented, it'll need some architectural changes to the codebase. With the current architecture, I don't think it's possible.

@pavel-solodilov
Copy link

Raised a draft PR to address this: #117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants