/**
  * LoginRadius function - To fetch social login providers
  *
  * @param string $apikey data to validate.
  *
  * @return object Social Login Providers/error messages.
  *
  * try{
  *   $providers = $GetProvidersAPIObject->getProvidersList();
  * }
  * catch (LoginRadiusException $e){
  *   $e->getMessage();
  * }
  */
 public function getProvidersList()
 {
     $url = LR_CDN_ENDPOINT . "/interface/json/" . LoginRadius::getApiKey() . ".json";
     $response = LoginRadius::apiClient($url);
     $jsonResponse = explode('(', $response);
     if ($jsonResponse[0] == 'loginRadiusAppJsonLoaded') {
         return str_replace(')', '', $jsonResponse[1]);
     }
     throw new LoginRadiusException('Error Retrieving Providers List');
 }
 /**
  * Manage LoginRadius Authentication
  *
  * @param type $array
  * @return type
  */
 public static function authentication($array = array())
 {
     $result = array("appkey" => LoginRadius::getApiKey(), "appsecret" => LoginRadius::getApiSecret());
     if (is_array($array) && sizeof($array) > 0) {
         $result = array_merge($result, $array);
     }
     return $result;
 }