Hi,
Just one quick question. We would need to pass some custom header (e.g. Authorisation header) from Flexmonster to our Accelerator API, but it seems that requestHeader is supported only for CSV and JSON sources. Is that correct?
If it's not supported by SSAS Accelerator, do you think you could add it in some later version? I believe that it must be single line change 🙂
Thanks,
Lukas
Hello, Lukas,
Thank you for writing to us.
Our development team can add custom request headers for SSAS Accelerator. The release with this update will be available on January the 28th. Does it work for you?
Regards,
Tanya
Hello,
FYI I am currently trying Flexmonster using ASP.NET Core API project with Angular frontend and OAuth2 JWT Token Authorization and I am also very interested in this one plus the possibility to use the Flexmonster Accelerator with ASP.NET Core, as discussed here.
Edit: Will it be possible not only to initially set the custom request headers object when creating the Report object, but to change it later when the access token is refreshed from the server, something like:
flexmonster.updateData({
requestHeader: {
'Authorization': 'Bearer ...',
}
});
Hello Tanya,
Thanks, I hope we will manage to find some workaround until it will be implemented. But I'm glad that we are not the only ones who need it.
Regards,
Lukas
Hello, Lukas,
Thank you for your confirmation. We will notify you about the release.
Regards,
Tanya
Hello, Pavlina,
Thank you for mentioning your interest in custom request headers feature. We will notify you about its release.
As about changing the headers later, it will be possible if you specify the data source in updateData API call as well. Here is an example:
flexmonster.updateData({
filename:"https://cdn.flexmonster.com/data/data.json",
dataSourceType:"json",
requestHeader: {
'Authorization': 'Bearer ...'
}
})
Please let me know in case of other questions.
Regards,
Tanya
Hello Lukas and Pavlina,
We are glad to inform you that the latest minor release includes the requestHeader
update.
You are welcome to download the latest version and try it.
Regards,
Dmytro
Hi,
Sorry for opening this old topic, but we have a question regarding the request headers.
We have a problem when our short lived Authentication token expires, any request using this token will result in a 401 and errors will be shown to the user.
What we would like to be able to do, is when we get a 401, we automatically kick off a token refresh, then after that is complete, we send the same request, with the new token.
Is there any callback or something similar that we could register when the request ends up with 401, so that we could refresh the token?
Regards,
Lukas
Hello, Lukas,
Thank you for writing to us.
The following Flexmonster events may be used to help control the behavior when errors occur: queryerror and olapstructureerror.
Here is a JSFiddle example to help to see when each event is called: https://jsfiddle.net/flexmonster/o57ytfzh/
Please let us know if this helps.
Best Regards,
Vera