Add initial Plenario live polling app
CakePHP 5.4 app for live polls: create via email without login, manage via secret admin link, join via code. Includes slide types (choice, wordcloud, open, scale, content), presenter mode, CSV export, captcha, throttling, tests and Gitea CI/deploy workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
eb319f8c1e
120 files changed
+15572
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Captcha;
|
||||
|
||||
use Cake\Http\ServerRequest;
|
||||
|
||||
/**
|
||||
* A captcha protects the public forms (create poll, recover links).
|
||||
*
|
||||
* Lifecycle: the controller calls challenge() when rendering the form and passes
|
||||
* the returned array to the `captcha` element; on submit it calls verify().
|
||||
*/
|
||||
interface CaptchaInterface
|
||||
{
|
||||
/**
|
||||
* @return string 'none' | 'math' | 'recaptcha'
|
||||
*/
|
||||
public function getType(): string;
|
||||
|
||||
/**
|
||||
* Prepares a challenge and returns the data the view element needs.
|
||||
*
|
||||
* @param \Cake\Http\ServerRequest $request Current request (session access)
|
||||
* @return array<string, mixed> Always contains 'type'
|
||||
*/
|
||||
public function challenge(ServerRequest $request): array;
|
||||
|
||||
/**
|
||||
* @param \Cake\Http\ServerRequest $request Submitted request
|
||||
* @return bool
|
||||
*/
|
||||
public function verify(ServerRequest $request): bool;
|
||||
}
|
||||
Reference in new issue
Block a user