-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What are the authentication methods supported to access data source URLs? #508
Comments
The JasperReports Library CE only has built-in support for Basic Authentication for data adapters. |
Just to add more information here about data adapters which retrieve file data (JSON, XML, Excel, CSV, etc) from remote URLs: They rely on pluggable implementations of the DataFileService and DataFileConnection interfaces, which can be added as extensions to the JRL core engine. In our standard HTTP basic authentication, we pass username and password. But in a custom implementation of your own, you could pass tokens in request headers or others stuff. |
It's been a while since I last looked at HTTP data adapters, so I took a fresh look and I can tell you that if your method of authentication relies on passing certain headers to the HTTP request (tokens or something), then what you need is probably already possible: If you create a JSON or XML data adapter file in Jaspersoft Studio, to retrieve JSON or XML data from a remote URL, you'll see that the wizard proposes you to set static request headers or GET or POST parameters. In addition to this static information that can be stored in the data adapter file itself, request headers can have dynamic values that come from report parameters. This is achieved by marking report parameter definitions inside the JRXML with this configuration property that would cause their value to be injected in the request as request header values: https://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.http.data.header I assume that the authentication requiring some UI login screen happens somewhere inside your application, prior to the report execution and thus you obtain a token or something that you than can use to authenticate the data retrieval request. |
Also see the the sample reference. |
Hi Team,
We have jasperreports-6.21.3 community edition deployed in our environment & we uses JRXmlDataSource() to access the data source URLs, we would like to understand the authentication methods available for securely accessing data source URLs, such as OAuth, Bearer Token, or Digest Authentication.
Could you please provide information on the authentication methods supported by Jasper Studio and the corresponding Jasper APIs?
[Note: We have recently purchased te commercial edition jasperreport-9.0.0 & integration work is in progress]
Thanks,
Tushar
The text was updated successfully, but these errors were encountered: