Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence REST API token authentication

I have an app that authenticates users using LDAP (Active Directory). We also use LDAP for Confluence authentication.

I'm using the REST API to integrate Confluence with our app and I'd like the API requests to be executed in the user's context. This would enforce that a user only does what he/she's allowed to do as well as make sure that new post created/updated with the API carry the user's "stamp".

It seems like the older API had a way of issuing request with token instead of basic auth (username/password) but I can't seem to find the correct way to do this now.

Is it at all possible? Would anyone have a suggestion for a different way to accomplish what I'm trying to?

One thing important to me is not to hold onto the user's password. I would pass is authentication credentials on login, directly to Confluence's API, without having to "save" it somehow to be used later on.

 

Thanks!

 

PS: Running Confluence 6.3.1

3 answers

Hello @Jonathan F. Gingras 

My plugin API Tokens for Confluence generates tokens that could be used in integrations w/o exposing passwords. Also, it makes actions on behalf of the user (carry the user's "stamp").

Hope this is what are you looking for

Regards, Roman

0 votes

Confluence REST API does not provide a way of obtaining user tokens. You can still use old xml-rpc api method calls for authentication and other actions you need.

Alternatively, in your application, you may try to login your users by sending user credentials to Confluence login page, and parsing response. You need to save "seraph.confluence" and "JSESSIONID" cookie values from response, and use them in you REST calls (just add them to cookies header of your requests). That may do the trick, but may not work in all cases.

Hope that helps.

Hello Maksym,

     My confluence version is 5.0.3. Please suggest that our versions supports Rest APIs or not. what is seraph.confluence and jsessionid cokkie values? How to i get those values?How to use them in rest calls? Please explain in detail.

         

   

Thank you Maksym, it points me in the right direction.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

342 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you