You are here

public static function InstapageCmsPluginHelper::getAuthHeader in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/InstapageCmsPluginHelper.php \InstapageCmsPluginHelper::getAuthHeader()

Prepares an Auth header for API requests.

Parameters

array $tokens Tokens to encode in Auth header.:

Return value

string Encoded Auth header.

9 calls to InstapageCmsPluginHelper::getAuthHeader()
InstapageCmsPluginAjaxController::deletePage in core/InstapageCmsPluginAjaxController.php
Deletes a page from DB.
InstapageCmsPluginAjaxController::getLandingPages in core/InstapageCmsPluginAjaxController.php
Gets the landing pages stored in the DB.
InstapageCmsPluginAjaxController::getStats in core/InstapageCmsPluginAjaxController.php
Gets the stats of landing pages from local cache or from app, if cache is not present / invalid.
InstapageCmsPluginAjaxController::loadEditPage in core/InstapageCmsPluginAjaxController.php
Loads edit page.
InstapageCmsPluginAjaxController::loadListPages in core/InstapageCmsPluginAjaxController.php
Loads listing page.

... See full list

File

core/InstapageCmsPluginHelper.php, line 404

Class

InstapageCmsPluginHelper
Helper containing commonly used static functions.

Code

public static function getAuthHeader($tokens) {
  self::writeDiagnostics($tokens, 'Decoded tokens');
  return base64_encode(json_encode($tokens));
}