Define my http service credentials from properties

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Define my http service credentials from properties

mbojja
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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/2c683972-c7ac-4eaf-a5cf-bc00ddd6792eo%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Define my http service credentials from properties

Alessandro  Vernet
Administrator
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/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1596589249772-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Define my http service credentials from properties

mbojja
Thanks Alex - Is it secure to use for passwords and would these be available via the client?


On Wednesday, August 5, 2020 at 9:00:52 AM UTC+8, Alessandro Vernet wrote:
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')}"

<a href="https://doc.orbeon.com/xforms/core/attribute-value-templates" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fcore%2Fattribute-value-templates\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFEMs1Y-ZhpLmQMBKQLoDF1g4Y3Lw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fcore%2Fattribute-value-templates\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFEMs1Y-ZhpLmQMBKQLoDF1g4Y3Lw&#39;;return true;">https://doc.orbeon.com/xforms/core/attribute-value-templates
<a href="https://doc.orbeon.com/xforms/xpath/extension-functions/extension-core#xxf-property" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fxpath%2Fextension-functions%2Fextension-core%23xxf-property\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzj8tBkGu-mopl8iCcb6WE7BhF2A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fxpath%2Fextension-functions%2Fextension-core%23xxf-property\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzj8tBkGu-mopl8iCcb6WE7BhF2A&#39;;return true;">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: <a href="http://discuss.orbeon.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;">http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/53a05336-cc07-4256-b196-98ca52c93d67o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Define my http service credentials from properties

Alessandro  Vernet
Administrator
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.

‑Alex

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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1596655283895-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet