ownCloud Integration App (#144)

+ external sso functionality
This commit is contained in:
RainLoop Team 2014-05-14 03:08:27 +04:00
parent e82108ac85
commit 4a47796781
29 changed files with 724 additions and 195 deletions

View file

@ -21,7 +21,7 @@ class Api
{
$oActions = \RainLoop\Actions::NewInstance();
}
return $oActions;
}
@ -43,7 +43,7 @@ class Api
{
return true;
}
if (!\class_exists('MailSo\Version'))
{
return false;
@ -63,17 +63,19 @@ class Api
* @param string $sEmail
* @param string $sPassword
* @param string $sLogin = ''
*
* @return string
* @param bool $bUseTimeout = true
*
* @return string
*/
public static function GetUserSsoHash($sEmail, $sPassword, $sLogin = '')
public static function GetUserSsoHash($sEmail, $sPassword, $sLogin = '', $bUseTimeout = true)
{
$sSsoHash = \sha1(\rand(10000, 99999).$sEmail.$sPassword.$sLogin.\microtime(true));
return self::Actions()->Cacher()->Set(self::Actions()->BuildSsoCacherKey($sSsoHash), \RainLoop\Utils::EncodeKeyValues(array(
'Email' => $sEmail,
'Password' => $sPassword,
'Login' => $sLogin
'Login' => $sLogin,
'Time' => $bUseTimeout ? \time() : 0
))) ? $sSsoHash : '';
}