Hi everyone,
I want to get the information about the current logged-in user of the Jira cloud addon.
the docs suggested the /myself endpoint for this situation, but the problem is this endpoint only returns the information about the user who it's api_token is used in the app, not the user who is logged-in to the app via his/hers dashboard.
How can I do this?
thank you in advance
Hi Shahryar,
I understand you are creating an app for Jira Cloud. However authentication is done differently depending on what exactly you are building. From the way you have described this, it sounds like you're using basic auth. If that is the case, your app can then only authenticate as the user that has supplied their API token to your app.
Please take a look over at https://developer.atlassian.com/cloud/jira/platform/security-overview/ It explains the different methods of managing authentication depending on the type of app you are creating. To meet your needs here, you will likely need to implement OAuth 2.0 in your app (provided this is not a Forge or Connect app, those frameworks have other existing means to manage this). More details on that method can be found over in https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/ .
I hope this helps.
Andy
Ah, in that case, please see Security for Connect apps. For Connect apps, you can use two different forms of Authorization: Authorization via scopes and app users or Authorization with user impersonation. The latter form does use a JWT bearer token which uses OAuth 2.0. More details on that over in User impersonation for Connect apps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.