1
0
Fork 0
forked from mCaptcha/website

chore: refactor

This commit is contained in:
Aravinth Manivannan 2023-10-27 21:39:40 +05:30
parent 0850e7b79b
commit f6a6bf371c
Signed by untrusted user: realaravinth
GPG key ID: F8F50389936984FF
27 changed files with 117 additions and 183 deletions

View file

@ -1,20 +1,20 @@
[[docs]]
name = "Introduction"
name = "Webmasters"
weight = 510
identifier = "Introduction"
url = "/docs/introduction/"
identifier = "Webmasters"
url = "/docs/webmasters/"
#[[docs]]
# name = "Terminology"
# weight = 520
# identifier = "Terminology"
# url = "/docs/terminology/"
[[docs]]
name = "Terminology"
weight = 520
identifier = "Terminology"
url = "/docs/terminology/"
[[docs]]
name = "Self-Hosted"
name = "Self-Hosting"
weight = 530
identifier = "Self-Hosted"
url = "/docs/self-hosted/"
identifier = "Self-Hosting"
url = "/docs/self-hosting/"
[[docs]]
name = "API"
@ -51,10 +51,9 @@
name = "Contact"
url = "/contact/"
weight = 40
[[main]]
name = "Docs"
url = "/docs/introduction/installing-captcha/"
url = "/docs/webmasters/installing-captcha/"
weight = 500

View file

@ -1,5 +1,5 @@
---
title : "Self-Hosted"
title : "Self-Hosting"
description: "Instructions to self-host mCaptcha"
lead: ""
date: 2021-07-21 15:44

View file

@ -8,7 +8,7 @@ draft: false
images: []
menu:
docs:
parent: "Self-Hosted"
parent: "Self-Hosting"
weight: 532
toc: true
---

View file

@ -10,7 +10,7 @@ draft: false
images: []
menu:
docs:
parent: "Self-Hosted"
parent: "Self-Hosting"
weight: 534
toc: true
---

View file

@ -7,7 +7,7 @@ draft: false
images: []
menu:
docs:
parent: "Self-Hosted"
parent: "Self-Hosting"
weight: 533
toc: true
---

View file

@ -8,7 +8,7 @@ draft: false
images: []
menu:
docs:
parent: "Self-Hosted"
parent: "Self-Hosting"
weight: 531
toc: true
---

View file

@ -1,9 +0,0 @@
---
title : "Terminology"
description: "Information about terminology used in mCaptcha, some of which unique to the project"
lead: ""
date: 2022-07-27T08:48:45+00:00
lastmod: 2020-07-27T08:48:45+00:00
draft: false
images: []
---

View file

@ -1,37 +0,0 @@
---
title: "Access token"
description: "mCaptcha implements leaky bucket algorithm to measure
current traffic levels. Cooldown period specifies the leak or the time
after which a visitor addition is decremented."
lead: ""
date: 2022-07-22
lastmod: 2022-07-22 20:17
draft: false
images: []
menu:
docs:
parent: "Terminology"
weight: 521
toc: true
---
When a visitor solves the CAPTCHA and sends their solution to an
mCaptcha instance, the solution will be verified for correctness. If the
solution is correct, mCaptcha will return a single use access token.
This access token should be attached to the visitor's requited to the
protected service and the protected service should validity of the
access token with the mCaptcha instance and only allow access to
protected resource if the access token is valid.
## Validate access token:
```bash
curl --location --request POST 'https://mcaptcha.example.net/api/v1/pow/siteverify' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "replace this with the access token presented by visitor",
"key": "replace this with the sitekey associated with the CAPTCHA"
"secret": "replace this with mCaptcha account secret, available in settings"
}'
```

View file

@ -1,30 +0,0 @@
---
title: "Cooldown Period"
description: "mCaptcha implements leaky bucket algorithm to measure
current traffic levels. Cooldown period specifies the leak or the time
after which a visitor addition is decremented."
lead: ""
date: 2022-07-22
lastmod: 2022-07-22 20:17
draft: false
images: []
menu:
docs:
parent: "Terminology"
weight: 522
toc: true
---
mCaptcha implements leaky bucket algorithm to measure
current traffic levels. Cooldown period specifies the leak or the time
after which a visitor addition is decremented.
For instance, if initial traffic level is 0 and a user visits one
second later, the traffic level will be incremented to 1. Now, if the
cooldown period is set to 30 seconds, the traffic level will be
decremented after 30 seconds. So after 30 seconds, the traffic level will
go from 1 to 0.
## Easy Mode: Default cooldown
When configuring mCaptcha in [easy Mode](/docs/introduction/configuring-difficulty-factor/#easy-option), the default cooldown period is set to 30 seconds.

View file

@ -1,23 +0,0 @@
---
title: "Difficulty Factor"
description: "Difficulty factor determines the time it takes to solve a CAPTCHA, there are two modes to setting difficulty factor: advance and easy, this page documents both modes."
lead: ""
date: 2022-07-22
lastmod: 2022-07-22 20:17
draft: false
images: []
menu:
docs:
parent: "Terminology"
weight: 523
toc: true
---
Difficulty factor determines the time it takes to solve a CAPTCHA. The
higher the difficulty factor, the longer it will take to generate a
proof of work for it to solve the CAPTCHA.
mCaptcha's proof of work based mechanism makes it highly accessible to
people with special needs but it is important to choose the difficulty factor
with care as very high difficulty factors will make the CAPTCHA
inaccessible to users on slow devices.

View file

@ -1,49 +0,0 @@
---
title: "Visitor Threshold"
description: "Visitor threshold is used to split traffic into levels. If
the traffic level supersceedes the configured threshold, then mCaptcha will
increase difficulty factor based on the configuration provided."
lead: ""
date: 2022-07-22
lastmod: 2022-07-22 20:17
draft: false
images: []
menu:
docs:
parent: "Terminology"
weight: 525
toc: true
---
mCaptcha's variable difficulty factor mechanism requires a website's traffic
statistics be split into levels, so that it can deploy the right
difficulty factor for each level.
Visitor threshold is used to traffic into levels and mCaptcha accepts a
difficulty configuration for each of these levels. When current traffic
exceeds a difficulty factor, mCaptcha will increase the difficulty
factor to the next configured level.
For instance, consider the configuration given below:
- Cool down period: 30 seconds
| Level | Difficulty Factor | Visitor Threshold |
| ----- | ----------------- | ----------------- |
| 1 | 5,000 | 2,000 |
| 2 | 50,000 | 5,000 |
| 3 | 500,000 | 10,000 |
| 4 | 5,000,000 | 15,000 |
If the website sees 2,000 requests in a 30 second window, level 1
difficulty factor(5,000) will be deployed. If the traffic increases to
5,000 requests in a 30 second window, then difficulty factor will be
upgraded to level 2(50,000). Likewise 10,000 and 15,000 requests over 30
seconds will result in difficulty factor being upgraded to 500,000 and
5,000,000 respectively.
Visitor threshold is how mCaptcha determines which difficulty factor
level to deploy. mCaptcha uses leaky bucket algorithm to keep the
visitor threshold constantly updated within the configured cool down
period. So, at any given moment the, the current visitor level will be
the amount of traffic that was served in the cool down period specified.

View file

@ -1,6 +1,6 @@
---
title : "Introduction"
description: "Introduction to mCaptcha."
title : "Webmasters"
description: "Introduction to mCaptcha for webmasters"
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00

View file

@ -10,7 +10,7 @@ draft: false
images: []
menu:
docs:
parent: "Introduction"
parent: "Webmasters"
weight: 512
toc: true
---

View file

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -1,23 +1,20 @@
---
title: "Site key"
description: "Site key is the unique identifier associated with a CAPTCHA created on mCaptcha"
title: "Webmasters FAQ"
description: "Frequently asked questions related to using mCaptcha as a webmaster"
lead: ""
date: 2022-07-22
lastmod: 2022-07-22 20:17
date: 2022-07-27T08:48:45+00:00
lastmod: 2020-07-27T08:48:45+00:00
draft: false
images: []
menu:
docs:
parent: "Terminology"
weight: 524
toc: true
parent: "Webmasters"
---
Site key is a unique identifier associated with CAPTCHA configurations
created on mCaptcha. It is required to integrate a CAPTCHA with your
website.
### Easy Mode: Default cooldown period
## How to get site key?
When configuring mCaptcha in [easy mode](/docs/webmasters/configuring-difficulty-factor/#easy-option), the default cooldown period is set to 30 seconds.
## How to get site key from dashboard?
1. Go to "Site keys" on the side panel in the dashboard

View file

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -8,7 +8,7 @@ draft: false
images: []
menu:
docs:
parent: "Introduction"
parent: "Webmasters"
weight: 511
toc: true
---

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -0,0 +1,86 @@
---
title: "Terminology"
description: "Information about terminology used in mCaptcha, some of which unique to the project"
lead: ""
date: 2022-07-27T08:48:45+00:00
lastmod: 2020-07-27T08:48:45+00:00
draft: false
menu:
docs:
parent: "Webmasters"
---
## Authorization token
When a visitor solves the CAPTCHA and sends their solution to an
mCaptcha instance, the solution will be verified for correctness. If the
solution is correct, mCaptcha will return a single use authorization token.
This authorization token should be attached to the visitor's requited to the
protected service and the protected service should validity of the
authorization token with the mCaptcha instance and only allow authorization to
protected resource if the authorization token is valid.
## Cooldown Period
mCaptcha implements leaky bucket algorithm to measure
current traffic levels. Cooldown period specifies the leak or the time
after which a visitor addition is decremented.
For instance, if initial traffic level is 0 and a user visits one
second later, the traffic level will be incremented to 1. Now, if the
cooldown period is set to 30 seconds, the traffic level will be
decremented after 30 seconds. So after 30 seconds, the traffic level will
go from 1 to 0.
## Difficulty Factor
Difficulty factor determines the time it takes to solve a CAPTCHA. The
higher the difficulty factor, the longer it will take to generate a
proof of work for it to solve the CAPTCHA.
mCaptcha's proof of work based mechanism makes it highly accessible to
people with special needs but it is important to choose the difficulty factor
with care as very high difficulty factors will make the CAPTCHA
inaccessible to users on slow devices.
## Sitekey
Site key is a unique identifier associated with CAPTCHA configurations
created on mCaptcha. It is required to integrate a CAPTCHA with your
website.
## Visitor Threshold
mCaptcha's variable difficulty factor mechanism requires a website's traffic
statistics be split into levels, so that it can deploy the right
difficulty factor for each level.
Visitor threshold is used to traffic into levels and mCaptcha accepts a
difficulty configuration for each of these levels. When current traffic
exceeds a difficulty factor, mCaptcha will increase the difficulty
factor to the next configured level.
For instance, consider the configuration given below:
- Cool down period: 30 seconds
| Level | Difficulty Factor | Visitor Threshold |
| ----- | ----------------- | ----------------- |
| 1 | 5,000 | 2,000 |
| 2 | 50,000 | 5,000 |
| 3 | 500,000 | 10,000 |
| 4 | 5,000,000 | 15,000 |
If the website sees 2,000 requests in a 30 second window, level 1
difficulty factor(5,000) will be deployed. If the traffic increases to
5,000 requests in a 30 second window, then difficulty factor will be
upgraded to level 2(50,000). Likewise 10,000 and 15,000 requests over 30
seconds will result in difficulty factor being upgraded to 500,000 and
5,000,000 respectively.
Visitor threshold is how mCaptcha determines which difficulty factor
level to deploy. mCaptcha uses leaky bucket algorithm to keep the
visitor threshold constantly updated within the configured cool down
period. So, at any given moment the, the current visitor level will be
the amount of traffic that was served in the cool down period specified.