public sealed class ChallengeRule : IMessage<ChallengeRule>, IEquatable<ChallengeRule>, IDeepCloneable<ChallengeRule>, IBufferMessage, IMessageReference 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.
Implements
IMessageChallengeRule, IEquatableChallengeRule, IDeepCloneableChallengeRule, IBufferMessage, IMessageNamespace
Google.Cloud.RecaptchaEnterprise.V1Assembly
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:
scoreuser_ip_addressuser_asnuser_agentverified_bots.nameverified_bots.bot_type
Examples:
score < 0.5user_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 |
|