# Class Security#existServerCertificate

Security

- Defined in: security.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Security#existServerCertificate(successCallback, errorCallback, options) Returns whether a server certificate was registered or not.

## Class Detail

Security#existServerCertificate(successCallback, errorCallback, options)
Returns whether a server certificate was registered or not.

    // Javascript code
    function existServerCertificate () {
      var options = {
         userName : "testserver",
         password : "passCode1"
      };

      function successCb(cbObject) {
         console.log("cbObject : " + JSON.stringify(cbObject));
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var security = new Security();
      security.existServerCertificate(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  userName | String | username for the server certificate. | required
  password | String | password to be used for the registration of the server certificate before | required

Since:
  1.4.1
Returns:
  {Object}

  Property | Type | Description
  --- | --- | ---
  exist | Boolean | whether a server certificate was registered or not