mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 23:28:04 +01:00
Add by-action captcha score config
Enable setting different captcha score thresholds for different captcha actions via configuration
This commit is contained in:
committed by
ravi-signal
parent
437bc1358b
commit
59bc2c5535
@@ -262,6 +262,9 @@ class DynamicConfigurationTest {
|
||||
signupCountryCodes:
|
||||
- 1
|
||||
scoreFloor: 0.9
|
||||
scoreFloorByAction:
|
||||
challenge: 0.1
|
||||
registration: 0.2
|
||||
""";
|
||||
|
||||
final DynamicCaptchaConfiguration config =
|
||||
@@ -270,6 +273,8 @@ class DynamicConfigurationTest {
|
||||
|
||||
assertEquals(Set.of("1"), config.getSignupCountryCodes());
|
||||
assertEquals(0.9f, config.getScoreFloor().floatValue());
|
||||
assertEquals(0.1f, config.getScoreFloorByAction().get("challenge").floatValue());
|
||||
assertEquals(0.2f, config.getScoreFloorByAction().get("registration").floatValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user