[TYPO3-piwik] Mobile Apps and piwikintegration

Kay Strobach typo3 at kay-strobach.de
Wed Dec 8 09:23:29 CET 2010


Hi,

it's just going forward with mobile app support.
Currently there is a problem with generation the authTokens, as
Piwik.org seems to have a static relation between username / password
and token!


[code of piwik/plugins/UsersManager/API.php]
/**
 * Generates a unique MD5 for the given login & password
 *
 * @param string Login
 * @param string MD5ied string of the password
 */
public function getTokenAuth($userLogin, $md5Password)
{
	if(strlen($md5Password) != 32)
	{
		throw new Exception(Piwik_TranslateException
		   ('UsersManager_ExceptionPasswordMD5HashExpected'));
	}
	return md5($userLogin . $md5Password );
}
[/code]

This collides with the current idea of a complete independent API Key.
You can set the API code manually to the above value to enable mobile
Apps in the SVN version.

Basicly piwik should check wether the given username/password is correct
and return the correct API Key.

PS: Until this works, you may use the webinterface (what i would always
prefer over an app) - which is not optimized for mobile devices.

Steps:
 - enable TYPO3Login
 - enable TYPO3Menu
 - enable TYPO3Widgets
 - disable Login Plugin

Best regards
Kay


More information about the TYPO3-project-piwik mailing list