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