Skip to content
Code-Schnipsel Gruppen Projekte
Commit 64928366 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

docs: README usage

Übergeordneter 187210b6
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -23,7 +23,9 @@ The Package Name is: quiqqer/captcha
Usage
----------
### Frontend
### Showing and validating a CAPTCHA
#### Frontend
```js
require(['package/quiqqer/captcha/bin/controls/CaptchaDisplay'], function(CaptchaDisplay) {
var MyCaptchaDisplay = new CaptchaDisplay().inject(document.body);
......@@ -44,7 +46,7 @@ require(['package/quiqqer/captcha/bin/controls/CaptchaDisplay'], function(Captch
});
```
### Backend
#### Backend
```php
$isReponseValid = \QUI\Captcha\Handler::isResponseValid($response);
......@@ -55,6 +57,14 @@ if ($isResponseValid) {
}
```
### Implementing your own CAPTCHA
For an example of a CAPTCHA implementation you can see the class `\QUI\Captcha\Modules\Google` which implements reCAPTCHA.
A CAPTCHA implementation requires:
* CAPTCHA class (must implement `\QUI\Captcha\CaptchaInterface`)
* CAPTCHA PHP Control (should extend `\QUI\Captcha\Controls\CaptchaControl`)
* CAPTCHA JavaScript Control (must extend `package/quiqqer/captcha/bin/controls/Captcha`)
Contribute
----------
- Project: https://dev.quiqqer.com/quiqqer/captcha
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren