Class GoogleRecaptchaProperties
java.lang.Object
org.apereo.cas.configuration.model.support.captcha.GoogleRecaptchaProperties
- All Implemented Interfaces:
Serializable
,CasFeatureModule
@RequiresModule(name="cas-server-support-captcha")
public class GoogleRecaptchaProperties
extends Object
implements CasFeatureModule, Serializable
This is
GoogleRecaptchaProperties
.- Since:
- 5.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Recaptcha API versions.Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA regular expression pattern to indicate that captcha should be activated when the remote IP address matches this pattern, and otherwise skipped and disabled.The google reCAPTCHA badge position (only if invisible is enabled).double
getScore()
reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot).The google reCAPTCHA site secret.The google reCAPTCHA site key.The google reCAPTCHA endpoint for verification of tokens and input.Indicate the version of the recaptcha api.boolean
Whether google reCAPTCHA should be enabled.boolean
Whether google reCAPTCHA invisible should be enabled.setActivateForIpAddressPattern
(String activateForIpAddressPattern) A regular expression pattern to indicate that captcha should be activated when the remote IP address matches this pattern, and otherwise skipped and disabled.setEnabled
(boolean enabled) Whether google reCAPTCHA should be enabled.setInvisible
(boolean invisible) Whether google reCAPTCHA invisible should be enabled.setPosition
(String position) The google reCAPTCHA badge position (only if invisible is enabled).setScore
(double score) reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot).The google reCAPTCHA site secret.setSiteKey
(String siteKey) The google reCAPTCHA site key.setVerifyUrl
(String verifyUrl) The google reCAPTCHA endpoint for verification of tokens and input.Indicate the version of the recaptcha api.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
Constructor Details
-
GoogleRecaptchaProperties
public GoogleRecaptchaProperties()
-
-
Method Details
-
getVersion
Indicate the version of the recaptcha api. Accepted values are:V2, V3
. -
isEnabled
public boolean isEnabled()Whether google reCAPTCHA should be enabled. -
getSiteKey
The google reCAPTCHA site key. -
getVerifyUrl
The google reCAPTCHA endpoint for verification of tokens and input. -
getSecret
The google reCAPTCHA site secret. -
isInvisible
public boolean isInvisible()Whether google reCAPTCHA invisible should be enabled. -
getPosition
The google reCAPTCHA badge position (only if invisible is enabled). Accepted values are:bottomright
: bottom right corner, default value.bottomleft
: bottom left cornerinline
: allows to control the CSS.
-
getScore
public double getScore()reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). reCAPTCHA learns by seeing real traffic on your site. For this reason, scores in a staging environment or soon after implementing may differ from production. As reCAPTCHA v3 doesn't ever interrupt the user flow, you can first run reCAPTCHA without taking action and then decide on thresholds by looking at your traffic in the admin console. By default, you can use a threshold of 0.5. -
getActivateForIpAddressPattern
A regular expression pattern to indicate that captcha should be activated when the remote IP address matches this pattern, and otherwise skipped and disabled. -
setVersion
Indicate the version of the recaptcha api. Accepted values are:V2, V3
.- Returns:
this
.
-
setEnabled
Whether google reCAPTCHA should be enabled.- Returns:
this
.
-
setSiteKey
The google reCAPTCHA site key.- Returns:
this
.
-
setVerifyUrl
The google reCAPTCHA endpoint for verification of tokens and input.- Returns:
this
.
-
setSecret
The google reCAPTCHA site secret.- Returns:
this
.
-
setInvisible
Whether google reCAPTCHA invisible should be enabled.- Returns:
this
.
-
setPosition
The google reCAPTCHA badge position (only if invisible is enabled). Accepted values are:bottomright
: bottom right corner, default value.bottomleft
: bottom left cornerinline
: allows to control the CSS.
- Returns:
this
.
-
setScore
reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). reCAPTCHA learns by seeing real traffic on your site. For this reason, scores in a staging environment or soon after implementing may differ from production. As reCAPTCHA v3 doesn't ever interrupt the user flow, you can first run reCAPTCHA without taking action and then decide on thresholds by looking at your traffic in the admin console. By default, you can use a threshold of 0.5.- Returns:
this
.
-
setActivateForIpAddressPattern
A regular expression pattern to indicate that captcha should be activated when the remote IP address matches this pattern, and otherwise skipped and disabled.- Returns:
this
.
-