mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-11-29 05:18:50 -05:00
@@ -7,7 +7,6 @@ import java.awt.Font
|
||||
import java.awt.Color
|
||||
import lc.captchas.interfaces.ChallengeProvider
|
||||
import lc.captchas.interfaces.Challenge
|
||||
import scala.jdk.CollectionConverters.MapHasAsJava
|
||||
import java.util.{List => JavaList, Map => JavaMap}
|
||||
|
||||
class FilterChallenge extends ChallengeProvider {
|
||||
@@ -18,13 +17,11 @@ class FilterChallenge extends ChallengeProvider {
|
||||
}
|
||||
|
||||
def supportedParameters(): JavaMap[String, JavaList[String]] = {
|
||||
val supportedParams = Map(
|
||||
"supportedLevels" -> JavaList.of("medium", "hard"),
|
||||
"supportedMedia" -> JavaList.of("image/png"),
|
||||
"supportedInputType" -> JavaList.of("text")
|
||||
).asJava
|
||||
|
||||
supportedParams
|
||||
JavaMap.of(
|
||||
"supportedLevels",JavaList.of("medium", "hard"),
|
||||
"supportedMedia", JavaList.of("image/png"),
|
||||
"supportedInputType", JavaList.of("text")
|
||||
)
|
||||
}
|
||||
|
||||
def returnChallenge(): Challenge = {
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.awt.image.BufferedImage
|
||||
import java.awt.Color
|
||||
import lc.captchas.interfaces.ChallengeProvider
|
||||
import lc.captchas.interfaces.Challenge
|
||||
import scala.jdk.CollectionConverters.MapHasAsJava
|
||||
import java.util.{List => JavaList, Map => JavaMap}
|
||||
|
||||
class LabelCaptcha extends ChallengeProvider {
|
||||
@@ -30,13 +29,11 @@ class LabelCaptcha extends ChallengeProvider {
|
||||
}
|
||||
|
||||
def supportedParameters(): JavaMap[String, JavaList[String]] = {
|
||||
val supportedParams = Map(
|
||||
"supportedLevels" -> JavaList.of("hard"),
|
||||
"supportedMedia" -> JavaList.of("image/png"),
|
||||
"supportedInputType" -> JavaList.of("text")
|
||||
).asJava
|
||||
|
||||
supportedParams
|
||||
JavaMap.of(
|
||||
"supportedLevels", JavaList.of("hard"),
|
||||
"supportedMedia", JavaList.of("image/png"),
|
||||
"supportedInputType", JavaList.of("text")
|
||||
)
|
||||
}
|
||||
|
||||
def returnChallenge(): Challenge =
|
||||
|
||||
@@ -10,7 +10,6 @@ import javax.imageio.stream.MemoryCacheImageOutputStream;
|
||||
import lc.captchas.interfaces.ChallengeProvider
|
||||
import lc.captchas.interfaces.Challenge
|
||||
import lc.misc.GifSequenceWriter
|
||||
import scala.jdk.CollectionConverters.MapHasAsJava
|
||||
import java.util.{List => JavaList, Map => JavaMap}
|
||||
|
||||
class Drop {
|
||||
@@ -38,13 +37,11 @@ class RainDropsCP extends ChallengeProvider {
|
||||
}
|
||||
|
||||
def supportedParameters(): JavaMap[String, JavaList[String]] = {
|
||||
val supportedParams = Map(
|
||||
"supportedLevels" -> JavaList.of("medium", "easy"),
|
||||
"supportedMedia" -> JavaList.of("image/gif"),
|
||||
"supportedInputType" -> JavaList.of("text")
|
||||
).asJava
|
||||
|
||||
supportedParams
|
||||
JavaMap.of(
|
||||
"supportedLevels", JavaList.of("medium", "easy"),
|
||||
"supportedMedia", JavaList.of("image/gif"),
|
||||
"supportedInputType", JavaList.of("text")
|
||||
)
|
||||
}
|
||||
|
||||
private def extendDrops(drops: Array[Drop], steps: Int, xOffset: Int) = {
|
||||
|
||||
Reference in New Issue
Block a user