Migration towards 0.4.0
Important changes have been made for the new version 0.4.0. Versions >= 0.3.* become deprecated and a migration is required to support the new version.
In all cases
You will have to modify the urls used by the captcha.
For the frontend url, you will have to use version 0.4.0 and update your script tag with the source https://assets.teklia.com/ocapi/0.4.0/ocapi-0.4.0.js
. Please, see the Current releases section of this page for more information.
For the backend url, you will need to add the attribute data-ocapi-base-url
to your captcha tag with the value https://ocapi.preprod.teklia.com/v2
. Also use this url to validate a user. Please, see the Adding the challenge to a form section of this page for more details.
If you were using the captchan-
attributes, please use the new ocapi-
attributes. Just replace the word captchan
with ocapi
. The captchan-*
attributes are still available but are deprecated.
Your captcha tags before:
<div
id="captchan-challenge"
data-captchan-client="captchanPublicID"
></div>
<script
type="text/javascript"
src="https://assets.teklia.com/captchan/0.x.x/captchan-0.x.x.js"
integrity="sha384-xxxxxxxxxxxxxxxxxxxxxx"
crossorigin="anonymous"
></script>
Your captcha tags after:
<div
id="ocapi-challenge"
data-ocapi-client="ocapiPublicID"
data-ocapi-base-url="https://ocapi.preprod.teklia.com/v2"
></div>
<script
type="text/javascript"
src="https://assets.teklia.com/ocapi/0.4.0/ocapi-0.4.0.js"
integrity="sha384-xxxxxxxxxxxxxxxxxxxxxx"
crossorigin="anonymous"
></script>