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

How to Get Token in Confluence synchronized User Directory with Crowd Server

Truong Nguyen Nhut Mar 01, 2018

In the my confluence have connected with Crowd server  to synchronized User Directory, so i can use user was created from Crowd to login into confluence. 

I know The Crowd REST API can get Token by username and password, but i don't known get the token in Confluence when login. Because, I want use the token to authentication for the application embedded Confluence by Macro.

Please help me.

Thanks

 

2 answers

0 votes
James Richards Atlassian Team Mar 27, 2018

Hi Truong,

 

Are you talking about the JSESSIONID or if you're using Crowd then the crowd.token_key?

If you're using curl, you can run it with --cookie-jar filename.txt and save the cookies in a local file.

Usually REST calls use Basic Auth.

If you're taking about the XSRF check value you can also use -H 'X-Atlassian-Token: no-check' On the command line.

Hope this gives you some pointers.

Thanks,
James

0 votes
Marcin Kempa Atlassian Team Mar 27, 2018

Hi @Truong Nguyen Nhut,

 

It seems that you have a custom Confluence macro, probably provided by your plugin, that is pulling some data from external application. Since you have your Confluence connected to Crowd you would like to have your external application connected to Crowd as well so once users enter Confluence page they would be authenticated to the external app as well through Crowd SSO and would be able to access data in macro from that app. Is that a fair understanding of your problem?

If this is the case and you would like to be able to rely on Crowd SSO then all of your applications needs to be in the same domain as this mechanism relies on the HTTP cookies. Here is Crowd SSO overview documentation, the guide about integrating custom application with Crowd is here. The REST documentation for Crowd SSO may be found here.

 

There also might be other approach to authenticate users with your external application using Application Links. You may find more about it here. If you would like use that in your plugin, here is developers docs for Jira, but this should be fairly similar in Confluence.

 

Hope that helps!

Marcin Kempa

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Handling Opsgenie Alerts

Hi everyone, welcome to the kb articles for Opsgenie FAQs. I'm one of the Technical Support Engineers for Opsgenie who will be providing weekly posts on FAQs from customers.   All alerts are ...

72 views 0 3
Read article

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