Rev 458 | Rev 461 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 458 | Rev 459 | ||
---|---|---|---|
Line 347... | Line 347... | ||
347 | # --- Auth plugin |
347 | # --- Auth plugin |
348 | 348 | ||
349 | private static function registerAuthPlugin(OIDplusAuthPlugin $plugin) { |
349 | private static function registerAuthPlugin(OIDplusAuthPlugin $plugin) { |
350 | if (OIDplus::baseConfig()->getValue('DEBUG')) { |
350 | if (OIDplus::baseConfig()->getValue('DEBUG')) { |
351 | $password = generateRandomString(25); |
351 | $password = generateRandomString(25); |
- | 352 | ||
352 | list($salt,$authkey) = $plugin->generate($password); |
353 | $authInfo = $plugin->generate($password); |
- | 354 | $salt = $authInfo->getSalt(); |
|
- | 355 | $authKey = $authInfo->getAuthInfo(); |
|
- | 356 | ||
353 | if (strlen($salt) > 100) { |
357 | if (strlen($salt) > 100) { |
354 | throw new OIDplusException(_L('Auth plugin "%1" is erroneous: Salt is too long to fit into database field',basename($plugin->getPluginDirectory()))); |
358 | throw new OIDplusException(_L('Auth plugin "%1" is erroneous: Salt is too long to fit into database field',basename($plugin->getPluginDirectory()))); |
355 | } |
359 | } |
356 | if ((!$plugin->verify($authkey,$salt,$password)) || |
360 | if ((!$plugin->verify($authkey,$salt,$password)) || |
357 | (!empty($salt) && $plugin->verify($authkey,$salt.'x',$password)) || |
361 | (!empty($salt) && $plugin->verify($authkey,$salt.'x',$password)) || |