Topic
  • 2 replies
  • Latest Post - ‏2012-10-09T10:09:33Z by AntonAleksandrov
Pamu
Pamu
3 Posts

Pinned topic Ability to change the adapter urls, proxy userid and passwords from console

‏2012-10-04T20:33:10Z |
Currently changes to the http adapter configuration requires changes to the code. We need ability to change the userid and passwords or ability to add proxy configuration for the adapter to support deployment in production and staging environment. Once the code passes the QA, the development will have to chance to change the code so we need ability to change the configuration on the server through the Worklight Console or some admin tools to update the configuration on the server.

For example : Ability to configure the proxy after deploying the adapter.

<proxy>
<protocol>http</protocol>
<domain>99.999.999.99</domain>
<port>8080</port>
<authentication>
<basic/>
<serverIdentity>
<username>user</username>
<password>password</password>
</serverIdentity>
</authentication>
</proxy>

Thanks
  • AntonAleksandrov
    AntonAleksandrov
    4 Posts

    Re: Ability to change the adapter urls, proxy userid and passwords from console

    ‏2012-10-09T10:08:25Z  
    Hello,

    You can add the required values to worklight.properties file (which is supposed to change according to environment) and use them in your adapter.
    E.g. if you add
    my.domain=99.99.99.99
    my.port=9999

    you can use those values in adapter's xml with following syntax:
    <domain>${my.domain}</domain>
    <port>${my.port}</port>

    and in adapter's JS with following syntax:
    var myDomain = WL.Server.configuration
    var myPort = WL.Server.configuration
  • AntonAleksandrov
    AntonAleksandrov
    4 Posts

    Re: Ability to change the adapter urls, proxy userid and passwords from console

    ‏2012-10-09T10:09:33Z  
    Hello,

    You can add the required values to worklight.properties file (which is supposed to change according to environment) and use them in your adapter.
    E.g. if you add
    my.domain=99.99.99.99
    my.port=9999

    you can use those values in adapter's xml with following syntax:
    <domain>${my.domain}</domain>
    <port>${my.port}</port>

    and in adapter's JS with following syntax:
    var myDomain = WL.Server.configuration
    var myPort = WL.Server.configuration
    and in adapter's JS with following syntax:
    
    var myDomain = WL.Server.configuration[
    "my.domain"]; var myPort = WL.Server.configuration[
    "my.port"];