<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>need to use "getCredentials(parameter);" method from finesse.js</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=12659684" />
  <subtitle>need to use "getCredentials(parameter);" method from finesse.js</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=12659684</id>
  <updated>2013-06-19T07:09:36Z</updated>
  <dc:date>2013-06-19T07:09:36Z</dc:date>
  <entry>
    <title>RE: New Message from Absaar Javed in Cisco Finesse - General Questions: RE:</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11974963" />
    <author>
      <name>David Lender</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11974963</id>
    <updated>2013-02-15T15:38:35Z</updated>
    <published>2013-02-15T15:38:35Z</published>
    <summary type="html">getCredentials is used  to extract the credentials from the config object.  I found an example in the Finesse desktop:

//If the authorization string is provided, then use that to
//extract the ID and the password. Otherwise use the ID and
//password from the respective ID and password params.
if (_config.authorization) {
var creds = _util.getCredentials(_config.authorization);
_config.id = creds.id;
_config.password = creds.password;

You should be able to access the method by calling  _util.getCredentials(_config_authorization);


Finesse client services are initialized with the config when the finesse gadget is loaded:

finesse.clientservices.ClientServices.init(finesse.gadget.Config);

Here is how you get the gadget config  (from the SampleGadget_Final.js sample gadget):

// Configuration for the gadget
finesse.gadget.Config = (function () {
            var _prefs = new gadgets.Prefs();

            /** @scope finesse.gadget.Config */
            return {
                        authorization: _prefs.getString("authorization"),
                        host: _prefs.getString("host"),
                        restHost: "localhost"
            };
}());</summary>
    <dc:creator>David Lender</dc:creator>
    <dc:date>2013-02-15T15:38:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from Absaar Javed in Cisco Finesse - General Questions: RE:</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11967967" />
    <author>
      <name>Absaar Javed</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11967967</id>
    <updated>2013-02-15T13:20:23Z</updated>
    <published>2013-02-15T13:20:23Z</published>
    <summary type="html">or if I have to access 'user ID and password' via _config object, like
var userId=_config.id, var password=_config.password;
for my gadget, so that it can subscribe to finesse notifications, then how can I do this?</summary>
    <dc:creator>Absaar Javed</dc:creator>
    <dc:date>2013-02-15T13:20:23Z</dc:date>
  </entry>
  <entry>
    <title>need to use "getCredentials(parameter);" method from finesse.js</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11962246" />
    <author>
      <name>Absaar Javed</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11962246</id>
    <updated>2013-02-15T07:54:10Z</updated>
    <published>2013-02-15T07:54:10Z</published>
    <summary type="html">I need to use "getCredentials(parameter);" method from finesse.js, to get username and password in a third party gadget for it's login and  subscription, how can i access this method?</summary>
    <dc:creator>Absaar Javed</dc:creator>
    <dc:date>2013-02-15T07:54:10Z</dc:date>
  </entry>
</feed>

