xslt and authentication over HTTPS
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 15
- Joined: Fri Mar 29, 2019 12:25 am
xslt and authentication over HTTPS
Hi all,
I want to process documents that are delivered through APIs (xml or json files) which requires the users to be authenticated.
When I am using a web browser, the requests and paramaters are processed correctly.
When I am using XSLT to fetch the documents, for example with:
I get an Error 403.
Is it possible to either pass on the credentials or to store locally the authentication credentials with xslt or in Oxygen?. For information if of any use, here the login includes an "@" and the old method is not supported.
Many thanks in advance for your help!
Dominique
I want to process documents that are delivered through APIs (xml or json files) which requires the users to be authenticated.
When I am using a web browser, the requests and paramaters are processed correctly.
When I am using XSLT to fetch the documents, for example with:
Code: Select all
<xsl:variable name="sru-match" select="document($sru_query)//srw:record"/>
Is it possible to either pass on the credentials or to store locally the authentication credentials with xslt or in Oxygen?. For information if of any use, here the login includes an "@" and the old method is not supported
Code: Select all
login:password@site.com
Many thanks in advance for your help!
Dominique
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: xslt and authentication over HTTPS
Hi Dominique,
If you try to access from Oxygen a file (that is stored on WebDAV, FTP, HTTP), which requires the users to be authenticated, usually you will revive an authentication dialog. I think that this depends on the authentication method.
You can also add the user and password directly in the URL, something like this:
Best Regards,
Octavian
If you try to access from Oxygen a file (that is stored on WebDAV, FTP, HTTP), which requires the users to be authenticated, usually you will revive an authentication dialog. I think that this depends on the authentication method.
You can also add the user and password directly in the URL, something like this:
Code: Select all
document('https://user:password@site.com/locarion/file.xml')//srw:record
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 15
- Joined: Fri Mar 29, 2019 12:25 am
Re: xslt and authentication over HTTPS
Hi Tavy,
thank you for your reply. Alas, there is no prompt for a login/password and the authentication method http://user:password@site.com/ is not allowed in HTTPS. So, my issue is not solved. Do you have any additional idea?
Cheers
thank you for your reply. Alas, there is no prompt for a login/password and the authentication method http://user:password@site.com/ is not allowed in HTTPS. So, my issue is not solved. Do you have any additional idea?
Cheers
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: xslt and authentication over HTTPS
Hello Dominique,
How do you authenticate for that HTTPS server in the web browser (try in a private window)?
If the HTTPS server shows a login page (as opposed to an authentication popup), it's not possible to authenticate the same way from Oxygen. Your HTTPS server may require the use of a specific API for providing the login credentials. While it may be possible to do this from XSLT, it's not very straightforward and it is server API specific.
Regards,
Adrian
Actually HTTPS still allows you to specify the username and password as part of the URL (which gets translated into Basic Auth or Digest Auth), but your server may not allow these methods of authentication.Alas, there is no prompt for a login/password and the authentication method http://user:password@site.com/ is not allowed in HTTPS. So, my issue is not solved.
How do you authenticate for that HTTPS server in the web browser (try in a private window)?
If the HTTPS server shows a login page (as opposed to an authentication popup), it's not possible to authenticate the same way from Oxygen. Your HTTPS server may require the use of a specific API for providing the login credentials. While it may be possible to do this from XSLT, it's not very straightforward and it is server API specific.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 15
- Joined: Fri Mar 29, 2019 12:25 am
Re: xslt and authentication over HTTPS
Hello Adrian,
thank you very much for your explanations. As a matter of fact, the authentication for the API in a browser is done through a HTML form and not with a popup.
If it helps for a workaround: from the authentification (API html or else), I will get an authentification token, but I don't know how to pass that into the header of a request via xslt.
Do you have any advice?
Again, thank you!
Cheers,
Dominique
thank you very much for your explanations. As a matter of fact, the authentication for the API in a browser is done through a HTML form and not with a popup.
If it helps for a workaround: from the authentification (API html or else), I will get an authentification token, but I don't know how to pass that into the header of a request via xslt.
Do you have any advice?
Again, thank you!
Cheers,
Dominique
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: xslt and authentication over HTTPS
Hi,
HTTP Client comes to mind, if you want to mess with the HTTP requests.
Although I must mention I haven't used it before, so take this for what it is, just a possibility to investigate.
Regards,
Adrian
HTTP Client comes to mind, if you want to mess with the HTTP requests.
Although I must mention I haven't used it before, so take this for what it is, just a possibility to investigate.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 15
- Joined: Fri Mar 29, 2019 12:25 am
Re: xslt and authentication over HTTPS
Hi,
have not tested it yet, but seems to be exactly what I need. Thank you for the piece of advice. The documentation and sample pages deal with my issue and I should be able to overcome it.
Cheers,
D
have not tested it yet, but seems to be exactly what I need. Thank you for the piece of advice. The documentation and sample pages deal with my issue and I should be able to overcome it.
Cheers,
D
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service