Commit Graph

202 Commits

Author SHA1 Message Date
Scala Steward 57ce691a00
Reformat with sbt-java-formatter 0.8.0
Executed command: sbt javafmtAll
2022-10-23 18:04:16 +00:00
hrj 907210f229 show a message when playground is enabled 2022-10-11 07:30:58 +05:30
hrj 58c6e96dc9 fix #175: playgroundEnabled config option was not effective 2022-10-11 07:30:46 +05:30
Scala Steward b402d34be8
Reformat with scalafmt 3.5.1 2022-04-16 20:42:16 +02:00
hrj 9b56759c80 match size in demo to size in default config 2022-04-05 10:14:28 +05:30
hrj 8df6039a7d define maxAttemptsRatio instead of maxAttempts 2022-04-05 10:13:58 +05:30
hrj a4df7a346d rename throttle to `bufferCount` in captcha fields 2022-04-05 10:13:25 +05:30
hrj 5218653f56 shadow text: center text 2022-04-05 10:12:38 +05:30
hrj 8c38ba2a21 minor cleanup 2022-04-05 09:54:03 +05:30
hrj cd6c8d790a renamed throttle config option to `bufferCount` 2022-04-05 09:53:58 +05:30
hrj c809872b8d Merge remote-tracking branch 'origin/master' into fix98SizeParam 2022-04-04 19:27:04 +05:30
hrj caf03d7a48 raindrops: vary length based on level, and use safe alphaNumeric characters 2022-04-04 11:13:25 +05:30
hrj 3aeb258851 rain drops: scale text to fit image size 2022-04-04 11:07:50 +05:30
hrj f8626e3670 shadow text: adapt text to size dynamically 2022-04-03 23:22:45 +05:30
hrj 83b0eb069e shadow text: dynamic kernel size 2022-04-03 23:09:45 +05:30
hrj 832053f6e9 minor, simplification 2022-04-03 23:01:40 +05:30
hrj 6480da09ff helper setRenderingHints: set antialiasing on 2022-04-03 23:01:26 +05:30
hrj 23a6a43d2d shadow text: simplify text drawing 2022-04-03 22:58:12 +05:30
hrj 7f77f819dd popping characters: adjust height to size 2022-04-03 22:49:35 +05:30
hrj bfc7174e2a FilterChallenge: use bold font 2022-04-03 16:45:53 +05:30
hrj 0c48f8fbd1 filter challenge: ensure that text fits within image width 2022-04-03 16:45:33 +05:30
hrj b33dd8adcf filter challenge: adjust filter effect based on difficult level 2022-04-02 23:18:46 +05:30
hrj d797acdcac FilterChallenge: adjust difficult based on parameter 2022-04-02 23:07:38 +05:30
hrj 444982e65f added HelperFunctions.safeAlphaNum 2022-04-02 23:06:57 +05:30
Scala Steward c396fe5c4a
Reformat with scalafmt 3.5.0 2022-04-02 19:26:52 +02:00
hrj cc8addb0c7 filter challenge: scale font height based on image size 2022-04-02 22:51:45 +05:30
hrj d7c1f9a4cc handle exceptions thrown by captcha provider 2022-04-02 22:51:19 +05:30
hrj 4f3bec0bc6 each challenge provider now respects the size parameter when construction image 2022-03-01 23:03:43 +05:30
hrj edd211fb52 respect size and level parameters
* Add size and level parameters to ChallengeProvider.returnChallenge()
* Add size column to challenge table
* Pass size and level parameters to all relevant calls
* Add size field to demo app
2022-03-01 22:51:38 +05:30
hrj f0659da3eb add a welcome message to root path 2022-03-01 19:11:13 +05:30
hrj c8db914cfd minor simplification 2022-03-01 17:21:30 +05:30
hrj a54947cfc2 shutdown server gracefully 2022-03-01 13:23:29 +05:30
hrj cb0c244779 in background task, divide total required by number of combinations, and create in multiple iterations
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-03-01 09:37:33 +05:30
hrj 8316084ee7 create equal number of captchas for each parameter combination in background task
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-03-01 09:37:33 +05:30
hrj e44a1df22e select random captchas
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-03-01 09:37:33 +05:30
hrj 52b071d680 renamed Captcha to CaptchaManager
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-02-24 20:12:58 +05:30
hrj 497b88f0d3 simplify logic for background task
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-02-24 20:12:58 +05:30
Scala Steward dbe0692b8b
Reformat with scalafmt 3.3.2 2022-01-20 05:36:07 +01:00
Rahul Rudragoudar 5072926bfc Refactor: lambda to fn
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2022-01-09 22:34:33 +05:30
Rahul Rudragoudar d5cf860629 Extract and read from configField case class
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2022-01-09 21:37:13 +05:30
Rahul Rudragoudar 8e66f3fa8e WIP: Add config case class to avoid type change
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2022-01-09 01:18:33 +05:30
Rahul Rudragoudar fabd5dd7ec Convert playgroundEnabled: bool to string
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2022-01-08 02:16:03 +05:30
Rahul Rudragoudar 8e39505644 Make config parameters optional with defaults
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2022-01-08 01:59:22 +05:30
hrj 3e99c0d38b update to scala 3
Signed-off-by: hrj <harshad.rj@gmail.com>
2022-01-03 18:56:06 +05:30
Rahul Rudragoudar 5e15ca6c35 Improve imports
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-12-26 22:04:02 +05:30
Rahul Rudragoudar 632eb49fd3 Add config option for maxAttempts field
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-12-26 22:04:02 +05:30
Scala Steward f463b487eb
Reformat with scalafmt 3.0.8 2021-12-15 22:54:41 +01:00
hrj 51a1f0a710 update h2 to 2.0.202
Note that this version is NOT backwards compatible with 1.x version

Hence, we use a new DB path "captcha2". The contents in the old DB can be reused
by following instructions in
https://github.com/h2database/h2database/releases/tag/version-2.0.202
2021-12-10 00:01:35 +05:30
jacobp 99ee7c55b5 Added configuration to disable serving the playground webpage and configuration to set Access-Control-Allow-Origin header value on responses.
Signed-off-by: JacobPozaic <jacobpozaic@gmail.com>
2021-12-09 11:02:43 -05:00
hrj 8f606da92f
Merge pull request #96 from rr83019/image-dpi
Set Image DPI for captcha providers
2021-09-02 16:37:00 +05:30