/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WAFV2 { namespace Model { /** *

The criteria for inspecting login requests, used by the ATP rule group to * validate credentials usage.

This is part of the * AWSManagedRulesATPRuleSet configuration in * ManagedRuleGroupConfig.

In these settings, you specify how * your application accepts login attempts by providing the request payload type * and the names of the fields within the request body where the username and * password are provided.

See Also:

AWS * API Reference

*/ class RequestInspection { public: AWS_WAFV2_API RequestInspection(); AWS_WAFV2_API RequestInspection(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API RequestInspection& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline const PayloadType& GetPayloadType() const{ return m_payloadType; } /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline bool PayloadTypeHasBeenSet() const { return m_payloadTypeHasBeenSet; } /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline void SetPayloadType(const PayloadType& value) { m_payloadTypeHasBeenSet = true; m_payloadType = value; } /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline void SetPayloadType(PayloadType&& value) { m_payloadTypeHasBeenSet = true; m_payloadType = std::move(value); } /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline RequestInspection& WithPayloadType(const PayloadType& value) { SetPayloadType(value); return *this;} /** *

The payload type for your login endpoint, either JSON or form encoded.

*/ inline RequestInspection& WithPayloadType(PayloadType&& value) { SetPayloadType(std::move(value)); return *this;} /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline const UsernameField& GetUsernameField() const{ return m_usernameField; } /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline bool UsernameFieldHasBeenSet() const { return m_usernameFieldHasBeenSet; } /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline void SetUsernameField(const UsernameField& value) { m_usernameFieldHasBeenSet = true; m_usernameField = value; } /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline void SetUsernameField(UsernameField&& value) { m_usernameFieldHasBeenSet = true; m_usernameField = std::move(value); } /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline RequestInspection& WithUsernameField(const UsernameField& value) { SetUsernameField(value); return *this;} /** *

The name of the field in the request payload that contains your customer's * username.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "username": "THE_USERNAME" } }, the username field specification is * /form/username.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named username1, the username field specification is * username1

*/ inline RequestInspection& WithUsernameField(UsernameField&& value) { SetUsernameField(std::move(value)); return *this;} /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline const PasswordField& GetPasswordField() const{ return m_passwordField; } /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline bool PasswordFieldHasBeenSet() const { return m_passwordFieldHasBeenSet; } /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline void SetPasswordField(const PasswordField& value) { m_passwordFieldHasBeenSet = true; m_passwordField = value; } /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline void SetPasswordField(PasswordField&& value) { m_passwordFieldHasBeenSet = true; m_passwordField = std::move(value); } /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline RequestInspection& WithPasswordField(const PasswordField& value) { SetPasswordField(value); return *this;} /** *

The name of the field in the request payload that contains your customer's * password.

How you specify this depends on the request inspection payload * type.

  • For JSON payloads, specify the field name in JSON pointer * syntax. For information about the JSON Pointer syntax, see the Internet * Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) * Pointer.

    For example, for the JSON payload { "form": { * "password": "THE_PASSWORD" } }, the password field specification is * /form/password.

  • For form encoded payload types, * use the HTML form names.

    For example, for an HTML form with the input * element named password1, the password field specification is * password1.

*/ inline RequestInspection& WithPasswordField(PasswordField&& value) { SetPasswordField(std::move(value)); return *this;} private: PayloadType m_payloadType; bool m_payloadTypeHasBeenSet = false; UsernameField m_usernameField; bool m_usernameFieldHasBeenSet = false; PasswordField m_passwordField; bool m_passwordFieldHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws