aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-08-01 18:07:03 +0200
committerGravatar GitHub <noreply@github.com> 2016-08-01 18:07:03 +0200
commit17c3e616e8c3b927ee46258a8b8b20371bf59592 (patch)
tree10bbc982d913fc6077701516bfdd212d4a6a2a84 /app/Models
parent75d175c0ebe138211064b107641cf3979a5cb032 (diff)
parentc1548e732d7472c40473b3d99858059333a05eae (diff)
Merge pull request #1187 from Alkarex/remove_persona
Remove Mozilla Persona login
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/Auth.php18
-rw-r--r--app/Models/ConfigurationSetter.php7
2 files changed, 2 insertions, 23 deletions
diff --git a/app/Models/Auth.php b/app/Models/Auth.php
index 4e7a71947..d689f7cdb 100644
--- a/app/Models/Auth.php
+++ b/app/Models/Auth.php
@@ -60,16 +60,6 @@ class FreshRSS_Auth {
Minz_Session::_param('currentUser', $current_user);
}
return $login_ok;
- case 'persona':
- $email = filter_var(Minz_Session::param('mail'), FILTER_VALIDATE_EMAIL);
- $persona_file = DATA_PATH . '/persona/' . $email . '.txt';
- if (($current_user = @file_get_contents($persona_file)) !== false) {
- $current_user = trim($current_user);
- Minz_Session::_param('currentUser', $current_user);
- Minz_Session::_param('mail', $email);
- return true;
- }
- return false;
case 'none':
return true;
default:
@@ -93,9 +83,6 @@ class FreshRSS_Auth {
case 'http_auth':
self::$login_ok = strcasecmp($current_user, httpAuthUser()) === 0;
break;
- case 'persona':
- self::$login_ok = strcasecmp(Minz_Session::param('mail'), $user_conf->mail_login) === 0;
- break;
case 'none':
self::$login_ok = true;
break;
@@ -143,9 +130,6 @@ class FreshRSS_Auth {
Minz_Session::_param('passwordHash');
FreshRSS_FormAuth::deleteCookie();
break;
- case 'persona':
- Minz_Session::_param('mail');
- break;
case 'http_auth':
case 'none':
// Nothing to do...
@@ -170,7 +154,7 @@ class FreshRSS_Auth {
public static function accessNeedsAction() {
$conf = Minz_Configuration::get('system');
$auth_type = $conf->auth_type;
- return $auth_type === 'form' || $auth_type === 'persona';
+ return $auth_type === 'form';
}
}
diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php
index 250c14c39..e472b1e7f 100644
--- a/app/Models/ConfigurationSetter.php
+++ b/app/Models/ConfigurationSetter.php
@@ -95,11 +95,6 @@ class FreshRSS_ConfigurationSetter {
$data['language'] = $value;
}
- private function _mail_login(&$data, $value) {
- $value = filter_var($value, FILTER_VALIDATE_EMAIL);
- $data['mail_login'] = $value ? $value : '';
- }
-
private function _old_entries(&$data, $value) {
$value = intval($value);
$data['old_entries'] = $value > 0 ? $value : 3;
@@ -278,7 +273,7 @@ class FreshRSS_ConfigurationSetter {
private function _auth_type(&$data, $value) {
$value = strtolower($value);
- if (!in_array($value, array('form', 'http_auth', 'persona', 'none'))) {
+ if (!in_array($value, array('form', 'http_auth', 'none'))) {
$value = 'none';
}
$data['auth_type'] = $value;