/** * Decodes a token generated with encodeToken and returns an array of options * * @param string $token token options * @param bool $url_decode should it URL decode the token true by default * @return array Array of options for the authentication token */ function _decodeToken($token) { return (array) Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting('admin', 'token_key'))); }
/** * Decodes a token generated with encodeToken and returns an array of options * * @param string $token token options * @param bool $url_decode should it URL decode the token true by default * @return array Array of options for the authentication token */ function _decodeToken($token) { return (array)Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting(AK_DEFAULT_ADMIN_SETTINGS, 'token_key'))); }
/** * Reads Json string in the following format: * * {"id":1,"first_name":"Hansi","last_name":"M\u00fcller", * "email":"*****@*****.**","created_at":"2008-01-01 13:01:23"} * * and returns an ActiveRecord Object * * @param string $json * @return AkActiveRecord */ function fromJson($json) { $json = Ak::fromJson($json); $array = Ak::convert('Object','Array',$json); return $this->_fromArray($array); }
/** * Decodes a token generated with encodeToken and returns an array of options * * @param string $token token options * @param bool $url_decode should it URL decode the token true by default * @return array Array of options for the authentication token */ static function decodeToken($token) { return (array) Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting(self::getSettingsNamespace(), 'token_key'))); }