Page 1 of 1

Designer, OData and authentication header

Posted: Thu Jun 04, 2020 3:30 am
by ysantosa
Hello.

I've got a question on how to authenticate with OData when creating a data source from the Designer.

There's only Username and Password that goes as Query parameters (which is a security concern).

But importantly - is there a way to customise this before connecting ?

For example - changing authentication header to add tokens.

In Designer ? No programmatic authentication please - I just want this to work from within the Designer.

Much appreciated for answering.

Kind regards.

Re: Designer, OData and authentication header

Posted: Mon Jun 08, 2020 12:50 pm
by HighAley
Hello,

Could you describe your request more detailed?
Do you want to set the token in the Desginer?
Will it be the same each time?
Do you want to be able to change it later?
Before each report rendering or just once?

Thank you.

Ticket reference: #2193.

Re: Designer, OData and authentication header

Posted: Tue Jun 09, 2020 11:52 pm
by ysantosa
> Do you want to set the token in the Desginer?
Yes, I want to be able to set tokens in the Designer - be it Designer in windows or javascript client.

> Will it be the same each time?
It will be the same as long as the token doesn't expire.

> Do you want to be able to change it later?
Yes - when the token expire, I need to be able to refresh it.

> Before each report rendering or just once?
Does it matter ? Which one is easier ?

I'd like to know if there are examples for both.

And thanks for replying !

Re: Designer, OData and authentication header

Posted: Sun Jun 14, 2020 7:57 pm
by ysantosa
any ideas ?

Re: Designer, OData and authentication header

Posted: Thu Jun 18, 2020 8:04 am
by HighAley
Hello,

You could use the next code in the onBeginProcessData event to add necessary headers.

Code: Select all

viewer.onBeginProcessData = function (event) {
	event.headers.push({key: "headerName", value: "headerValue"});
}
Thank you.

Re: Designer, OData and authentication header

Posted: Wed Nov 18, 2020 11:23 pm
by iandreev
HighAley wrote: Thu Jun 18, 2020 8:04 am Hello,

You could use the next code in the onBeginProcessData event to add necessary headers.

Code: Select all

viewer.onBeginProcessData = function (event) {
	event.headers.push({key: "headerName", value: "headerValue"});
}
Thank you.
Hello, I'm looking for the similar solution for .NET server side report generation.
I use .NET back-end and front-end angular viewer (stimulsoft-viewer-angular)
I want to generate report on back-end and be able to pass Authentication header to my OData services.
Is it possible?

Re: Designer, OData and authentication header

Posted: Mon Nov 23, 2020 1:33 pm
by HighAley
Hello.

This solution is for JS report engine only.

Thank you.