Designer, OData and authentication header

Stimulsoft Reports.NET discussion
Post Reply
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

Designer, OData and authentication header

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Designer, OData and authentication header

Post 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.
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

Re: Designer, OData and authentication header

Post 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 !
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

Re: Designer, OData and authentication header

Post by ysantosa »

any ideas ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Designer, OData and authentication header

Post 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.
iandreev
Posts: 2
Joined: Fri Nov 06, 2020 3:03 pm

Re: Designer, OData and authentication header

Post 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?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Designer, OData and authentication header

Post by HighAley »

Hello.

This solution is for JS report engine only.

Thank you.
Post Reply