Google Cloud reCAPTCHA Enterprise v1 API - Class ChallengeRule (2.21.0)

public sealed class ChallengeRule : IMessage<ChallengeRule>, IEquatable<ChallengeRule>, IDeepCloneable<ChallengeRule>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud reCAPTCHA Enterprise v1 API class ChallengeRule.

A rule to configure the behavior of reCAPTCHA for conditionally presenting a challenge.

Inheritance

object > ChallengeRule

Namespace

Google.Cloud.RecaptchaEnterprise.V1

Assembly

Google.Cloud.RecaptchaEnterprise.V1.dll

Constructors

ChallengeRule()

public ChallengeRule()

ChallengeRule(ChallengeRule)

public ChallengeRule(ChallengeRule other)
Parameter
Name Description
other ChallengeRule

Properties

Challenge

public ChallengeRule.Types.ChallengeOutcome Challenge { get; set; }

Present a challenge to the user.

Property Value
Type Description
ChallengeRuleTypesChallengeOutcome

Condition

public string Condition { get; set; }

Optional. A CEL condition that must be met for this rule to apply. If unspecified, the rule applies unconditionally. The following fields can be referenced in the condition:

  • score
  • user_ip_address
  • user_asn
  • user_agent
  • verified_bots.name
  • verified_bots.bot_type

Examples:

  • score < 0.5
  • user_ip_address == "123.45.67.89"
  • user_agent.contains("Chrome")
  • score < 0.5 && user_ip_address == "123.45.67.89"
Property Value
Type Description
string

NoChallenge

public ChallengeRule.Types.NoChallengeOutcome NoChallenge { get; set; }

Do not present a challenge to the user.

Property Value
Type Description
ChallengeRuleTypesNoChallengeOutcome

OutcomeCase

public ChallengeRule.OutcomeOneofCase OutcomeCase { get; }
Property Value
Type Description
ChallengeRuleOutcomeOneofCase