/**
  * 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;
 }
 /**
  *
  * LoginRadius function - Fetch LoginRadius access token after authentication. It will be valid for the specific duration of time specified in the response.
  * @param string LoginRadius API Secret
  * @param string LoginRadius API token
  *
  * @return mixed string|object LoginRadius access token.
  *
  * try{
  *   $accesstoken = $loginradiusObject->exchangeAccessToken($request_token);
  * }
  * catch (LoginRadiusException $e){
  *   $e->getMessage();
  *   $e->getErrorResponse();
  * }
  */
 public function exchangeAccessToken($request_token)
 {
     return $this->apiClientHandler('access_token', false, array("token" => $request_token, "secret" => LoginRadius::getApiSecret()));
 }