< Home

http-method post

Function

The http-method post command configures parameters for parsing and replying to POST request packets of the HTTP or HTTPS protocol.

The undo http-method post command restores the default configuration.

By default, the system has configured parameters for parsing and replying to POST request packets of the HTTP or HTTPS protocol. For details, see the "Parameters" table.

Format

http-method post { cmd-key cmd-key [ login login-key | logout logout-key ] * | init-url-key init-url-key | login-fail response { err-msg { authenserve-reply-message | msg msg } | redirect-login-url | redirect-url redirect-url [ append-reply-message msgkey ] } | login-success response { msg msg | redirect-init-url | redirect-url redirect-url } | logout-fail response { msg msg | redirect-url redirect-url } | logout-success response { msg msg | redirect-url redirect-url } | password-key password-key | user-mac-key user-mac-key | userip-key userip-key | username-key username-key } *

undo http-method post { all | { cmd-key | init-url-key | login-fail | login-success | logout-fail | logout-success | password-key | user-mac-key | userip-key | username-key } * }

Parameters

Parameter
Description Value

cmd-key cmd-key

Specifies the command identification keyword. The default value is cmd.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

login login-key

Specifies the user login identification keyword. The default value is login.

The value is a string of 1 to 15 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

logout logout-key

Specifies the user logout identification keyword. The default value is logout.

The value is a string of 1 to 15 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

init-url-key init-url-key

Specifies the identification keyword for the user initial login URL. The default value is initurl.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

login-fail response { err-msg { authenserve-reply-message | msg msg } | redirect-login-url | redirect-url redirect-url [ append-reply-message msgkey ] }

Specifies the response message upon a user login failure.

  • err-msg authenserve-reply-message: The response message returned by the authentication server is displayed upon a user login failure.
  • err-msg msg msg: A specified message is displayed upon a user login failure.
  • redirect-login-url: A user is redirected to the login URL upon a login failure. This mode is used by default.
  • redirect-url redirect-url: A user is redirected to a specified URL upon a login failure.
  • append-reply-message msgkey: The redirect URL carries the identification keyword for the response message returned by the authentication server.
  • msg: The value is a string of 1 to 200 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

  • redirect-url: The value is a string of 1 to 247 case-sensitive characters without spaces.

  • msgkey: The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

login-success response { msg msg | redirect-init-url | redirect-url redirect-url }

Specifies the response message upon successful user login.

  • msg msg: A specified message is displayed upon successful user login.
  • redirect-init-url: A user is redirected to the initial login URL upon successful login. This mode is used by default.
  • redirect-url redirect-url: A user is redirected to a specified URL upon successful login.
  • msg: The value is a string of 1 to 200 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

  • redirect-url: The value is a string of 1 to 247 case-sensitive characters without spaces.

logout-fail response { msg msg | redirect-url redirect-url }

Specifies the response message upon a user logout failure.

  • msg msg: A specified message is displayed upon a user logout failure. The default value is LogoutFail!.
  • redirect-url redirect-url: A user is redirected to a specified URL upon a logout failure.
  • msg: The value is a string of 1 to 200 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

  • redirect-url: The value is a string of 1 to 247 case-sensitive characters without spaces.

logout-success response { msg msg | redirect-url redirect-url }

Specifies the response message upon successful user logout.

  • msg msg: A specified message is displayed upon successful user logout. The default value is LogoutSuccess!.
  • redirect-url redirect-url: A user is redirected to a specified URL upon successful logout.
  • msg: The value is a string of 1 to 200 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

  • redirect-url: The value is a string of 1 to 247 case-sensitive characters without spaces.

password-key password-key

Specifies the password identification keyword. The default value is password.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

user-mac-key user-mac-key

Specifies the identification keyword for the user MAC address. The default value is macaddress.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

userip-key userip-key

Specifies the identification keyword for the user IP address. The default value is ipaddress.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

username-key username-key

Specifies the user name identification keyword. The default value is username.

The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).

all

Indicates all parameters.

-

Views

Portal server template view

Default Level

2: Configuration level

Usage Guidelines

When the device uses the HTTP or HTTPS protocol to communicate with the Portal server, a user sends POST request packets (carrying parameters such as the user name and MAC address) to the device as required by the Portal server. After receiving the POST request packets, the device parses parameters in the packets. If identification keywords of the parameters differ from those configured on the device, the user authentication fails. Therefore, you need to run the http-method post command to configure the identification keywords based on the Portal server configuration.

After successful user login or logout, or a user login or logout failure, the device sends the login or logout result to the user based on the http-method post command configuration. For example, the device sends the LogoutSuccess! message to a user who logs out successfully by default.

Example

# Set the command identification keyword to cmd1 for parsing POST request packets of the HTTP or HTTPS protocol.

<HUAWEI> system-view
[HUAWEI] web-auth-server abc
[HUAWEI-web-auth-server-abc] http-method post cmd-key cmd1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >