Define my http service credentials from properties

6 views
Skip to first unread message

Mani

unread,
Aug 4, 2020, 3:51:04 AM8/4/20
to Orbeon Forms
Hi guys - How do I set the http service username and password from my own defined properties


I set the below properties  

<property
      as="xs:string"
      name="http.service.username"
      value="abcde"/>

<property
      as="xs:string"
      name="http.service.password"
      value="12345"/>


How do i define these here

<xf:submission
    id="save-submission"
   class="fr-service"
    method="get"
    resource="my-url"
    serialization="none"
    mediatype=""
    xxf:username="http.service.username"
    xxf:password="http.service.password"/>


Thanks

Alessandro Vernet

unread,
Aug 4, 2020, 9:00:52 PM8/4/20
to orb...@googlegroups.com
Hi Manish,

The value of `xxf:username` and `xxf:password` accept AVTs (see 1st link
below), so you should be able to use the `xxf:property()` XPath function
(see 2nd link below), as in:

xxf:username="{xxf:property('http.service.username')}"

https://doc.orbeon.com/xforms/core/attribute-value-templates
https://doc.orbeon.com/xforms/xpath/extension-functions/extension-core#xxf-property

You'll let me know if this works for you.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

Mani

unread,
Aug 5, 2020, 2:26:15 AM8/5/20
to Orbeon Forms
Thanks Alex - Is it secure to use for passwords and would these be available via the client?

Alessandro Vernet

unread,
Aug 5, 2020, 3:21:28 PM8/5/20
to orb...@googlegroups.com
Hi Manish,

It won't be available on the browser; the submission is done entirely from
your server running Orbeon Forms to the server running your service. So
users won't see what you're sending, receiving, or anything else related to
the submission.
Reply all
Reply to author
Forward
0 new messages