Class JsChallenge
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.waas.model.JsChallenge
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class JsChallenge extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelThe JavaScript challenge settings.JavaScript Challenge is the function to filter abnormal or malicious bots and allow access to real clients. 
 Note: Objects should always be created or deserialized using theJsChallenge.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theJsChallenge.Builder, which maintain a set of all explicitly set fields calledJsChallenge.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classJsChallenge.ActionThe action to take against requests from detected bots.static classJsChallenge.Builder
 - 
Constructor SummaryConstructors Constructor Description JsChallenge(Boolean isEnabled, JsChallenge.Action action, Integer failureThreshold, Integer actionExpirationInSeconds, Header setHttpHeader, BlockChallengeSettings challengeSettings, Boolean areRedirectsChallenged, List<AccessRuleCriteria> criteria, Boolean isNatEnabled)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsChallenge.Builderbuilder()Create a new builder.booleanequals(Object o)JsChallenge.ActiongetAction()The action to take against requests from detected bots.IntegergetActionExpirationInSeconds()The number of seconds between challenges from the same IP address.BooleangetAreRedirectsChallenged()When enabled, redirect responses from the origin will also be challenged.BlockChallengeSettingsgetChallengeSettings()List<AccessRuleCriteria>getCriteria()When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.IntegergetFailureThreshold()The number of failed requests before taking action.BooleangetIsEnabled()Enables or disables the JavaScript challenge Web Application Firewall feature.BooleangetIsNatEnabled()When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.HeadergetSetHttpHeader()Adds an additional HTTP header to requests that fail the challenge before being passed to the origin.inthashCode()JsChallenge.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
 
- 
- 
- 
Constructor Detail- 
JsChallenge@Deprecated @ConstructorProperties({"isEnabled","action","failureThreshold","actionExpirationInSeconds","setHttpHeader","challengeSettings","areRedirectsChallenged","criteria","isNatEnabled"}) public JsChallenge(Boolean isEnabled, JsChallenge.Action action, Integer failureThreshold, Integer actionExpirationInSeconds, Header setHttpHeader, BlockChallengeSettings challengeSettings, Boolean areRedirectsChallenged, List<AccessRuleCriteria> criteria, Boolean isNatEnabled) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static JsChallenge.Builder builder() Create a new builder.
 - 
toBuilderpublic JsChallenge.Builder toBuilder() 
 - 
getIsEnabledpublic Boolean getIsEnabled() Enables or disables the JavaScript challenge Web Application Firewall feature.- Returns:
- the value
 
 - 
getActionpublic JsChallenge.Action getAction() The action to take against requests from detected bots.If unspecified, defaults to DETECT. - Returns:
- the value
 
 - 
getFailureThresholdpublic Integer getFailureThreshold() The number of failed requests before taking action.If unspecified, defaults to 10. - Returns:
- the value
 
 - 
getActionExpirationInSecondspublic Integer getActionExpirationInSeconds() The number of seconds between challenges from the same IP address.If unspecified, defaults to 60. - Returns:
- the value
 
 - 
getSetHttpHeaderpublic Header getSetHttpHeader() Adds an additional HTTP header to requests that fail the challenge before being passed to the origin.Only applicable when the action is set to DETECT. - Returns:
- the value
 
 - 
getChallengeSettingspublic BlockChallengeSettings getChallengeSettings() 
 - 
getAreRedirectsChallengedpublic Boolean getAreRedirectsChallenged() When enabled, redirect responses from the origin will also be challenged.This will change HTTP 301/302 responses from origin to HTTP 200 with an HTML body containing JavaScript page redirection. - Returns:
- the value
 
 - 
getCriteriapublic List<AccessRuleCriteria> getCriteria() When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.- Returns:
- the value
 
 - 
getIsNatEnabledpublic Boolean getIsNatEnabled() When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.- Returns:
- the value
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
toStringpublic String toString(boolean includeByteArrayContents) Return a string representation of the object.- Parameters:
- includeByteArrayContents- true to include the full contents of byte arrays
- Returns:
- string representation
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 
- 
 
-