Plugin: Whispeak add max_attempts option - refs BT#15820

pull/3377/head
Angel Fernando Quiroz Campos 7 years ago
parent f3ad22b3b8
commit 17b2ca4d16
  1. 12
      plugin/whispeakauth/WhispeakAuthPlugin.php
  2. 2
      plugin/whispeakauth/lang/english.php
  3. 2
      plugin/whispeakauth/lang/french.php
  4. 2
      plugin/whispeakauth/lang/spanish.php

@ -13,6 +13,7 @@ class WhispeakAuthPlugin extends Plugin
const SETTING_ENABLE = 'enable';
const SETTING_TOKEN = 'token';
const SETTING_INSTRUCTION = 'instruction';
const SETTING_MAX_ATTEMPTS = 'max_attempts';
const EXTRAFIELD_AUTH_UID = 'whispeak_auth_uid';
@ -29,6 +30,7 @@ class WhispeakAuthPlugin extends Plugin
[
self::SETTING_ENABLE => 'boolean',
self::SETTING_TOKEN => 'text',
self::SETTING_MAX_ATTEMPTS => 'text',
self::SETTING_INSTRUCTION => 'html',
]
);
@ -550,4 +552,14 @@ class WhispeakAuthPlugin extends Plugin
return $result;
}
/**
* Get the max_attemtps option.
*
* @return int
*/
public function getMaxAttempts()
{
return (int) $this->get(self::SETTING_MAX_ATTEMPTS);
}
}

@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/';
$strings['token'] = 'API key';
$strings['instruction'] = '<p>Add <code>$_configuration[\'whispeak_auth_enabled\'] = true;</code>'.
'in the <code>configuration.php</code> file</p>';
$strings['max_attempts'] = 'Max attempts';
$strings['max_attempts_help'] = 'If the Whispeak authentication is failed x times, then ask and verify the password of the user';
$strings['EnrollmentSampleText'] = 'The famous Mona Lisa painting was painted by Leonardo Da Vinci.';
$strings['AuthentifySampleText1'] = 'Dropping Like Flies.';

@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/';
$strings['token'] = 'API key';
$strings['instruction'] = '<p>Add <code>$_configuration[\'whispeak_auth_enabled\'] = true;</code>'.
'in the <code>configuration.php</code> file</p>';
$strings['max_attempts'] = 'Max attempts';
$strings['max_attempts_help'] = 'If the Whispeak authentication is failed x times, then ask and verify the password of the user';
$strings['EnrollmentSampleText'] = 'Le fameux chef-d\'oeuvre Mona Lisa a été peint par Léonardo da Vinci.';
$strings['AuthentifySampleText1'] = 'Dropping Like Flies.';

@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/';
$strings['token'] = 'Llave del API';
$strings['instruction'] = '<p>Agrega <code>$_configuration[\'whispeak_auth_enabled\'] = true;</code>'.
'al archivo <code>configuration.php</code></p>';
$strings['max_attempts'] = 'Máximo de intentos';
$strings['max_attempts_help'] = 'Si la autenticación de Whispeak falla x intentos, preguntar y verificar la contraseña del usuario';
$strings['EnrollmentSampleText'] = 'El famoso cuadro de Mona Lisa fue pintado por Leonardo Da Vinci.';
$strings['AuthentifySampleText1'] = 'Cayendo como moscas.';

Loading…
Cancel
Save