Rev 1086 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1086 | Rev 1116 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | class OIDplusCaptchaPluginNone extends OIDplusCaptchaPlugin { |
26 | class OIDplusCaptchaPluginNone extends OIDplusCaptchaPlugin { |
27 | 27 | ||
- | 28 | /** |
|
- | 29 | * @return string |
|
- | 30 | */ |
|
28 | public static function id(): string { |
31 | public static function id(): string { |
29 | return 'None'; |
32 | return 'None'; |
30 | } |
33 | } |
31 | 34 | ||
- | 35 | /** |
|
- | 36 | * @return bool |
|
- | 37 | */ |
|
32 | public function isVisible(): bool { |
38 | public function isVisible(): bool { |
33 | return false; |
39 | return false; |
34 | } |
40 | } |
35 | 41 | ||
- | 42 | /** |
|
- | 43 | * @param string|null $header_text |
|
- | 44 | * @param string|null $footer_text |
|
- | 45 | * @return string |
|
- | 46 | */ |
|
36 | public function captchaGenerate($header_text=null, $footer_text=null) { |
47 | public function captchaGenerate(string $header_text=null, string $footer_text=null): string { |
37 | return '<script> |
48 | return '<script> |
38 | var oidplus_captcha_response = function() { |
49 | var oidplus_captcha_response = function() { |
39 | return OIDplusCaptchaPluginNone.captchaResponse(); |
50 | return OIDplusCaptchaPluginNone.captchaResponse(); |
40 | }; |
51 | }; |
41 | var oidplus_captcha_reset = function() { |
52 | var oidplus_captcha_reset = function() { |
42 | return OIDplusCaptchaPluginNone.captchaReset(); |
53 | return OIDplusCaptchaPluginNone.captchaReset(); |
43 | }; |
54 | }; |
44 | </script>'; |
55 | </script>'; |
45 | } |
56 | } |
46 | 57 | ||
- | 58 | /** |
|
- | 59 | * @param array $params |
|
- | 60 | * @param string|null $fieldname |
|
- | 61 | * @return bool |
|
- | 62 | */ |
|
47 | public function captchaVerify($params, $fieldname=null) { |
63 | public function captchaVerify(array $params, string $fieldname=null): bool { |
48 | return true; |
64 | return true; |
49 | } |
65 | } |
50 | 66 | ||
- | 67 | /** |
|
- | 68 | * @return string |
|
- | 69 | */ |
|
51 | public static function setupHTML(): string { |
70 | public static function setupHTML(): string { |
52 | return '<div id="CAPTCHAPLUGIN_PARAMS_NONE">'. |
71 | return '<div id="CAPTCHAPLUGIN_PARAMS_NONE">'. |
53 | '<p>'._L('No CAPTCHA will be used. Please note that your system will be prone to "Brute force" attacks.').'</p>'. |
72 | '<p>'._L('No CAPTCHA will be used. Please note that your system will be prone to "Brute force" attacks.').'</p>'. |
54 | '</div>'; |
73 | '</div>'; |
55 | } |
74 | } |