Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Add an Atlassian Connect Token to Restful tables

Artem Grotskyi
Contributor
May 7, 2019

Hi all,

I'm about to use Restful tables in a Spring Boot add-on.
I have read through the Restful tables documentation but I haven't found anything about updating a request header and adding a JWT token to it.
Is there any way to do it? 
Are there other ways to use JWT authorization with Restful tables?

Thanks,
Artem

1 answer

1 accepted

0 votes
Answer accepted
Artem Grotskyi
Contributor
May 7, 2019

I have found that the best way is to set up ajax settings and add a JWT token to each ajax request:

$.ajaxSetup({
beforeSend: function (xhr) {
request.setRequestHeader("Authorization", "JWT " + tokenValue);
}
});

 

Suggest an answer

Log in or Sign up to answer