wechat-server-ip
Function
The wechat-server-ip command configures the domain name, Secure Sockets Layer (SSL) policy, and port number of the WeChat server.
The undo wechat-server-ip command restores the default settings of the WeChat server.
- The domain name of the WeChat server is api.weixin.qq.com.
- No SSL policy is configured in the system.
- The port number of the WeChat server is 443.
Format
wechat-server-ip [ url url-string ] ssl-policy policy-name [ port port-number ]
undo wechat-server-ip
Parameters
Parameter |
Description |
Value |
---|---|---|
url url-string |
Specifies the domain name of the WeChat server. |
The value is a string of 1 to 256 characters. |
ssl-policy policy-name |
Specifies the name of an SSL policy. |
The value must be the name of an existing SSL policy. |
port port-number |
Specifies the TCP port number used by the WeChat server. |
The value is an integer that ranges from 1 to 65535. |
Usage Guidelines
Usage Scenario
In a WeChat authentication scenario, the device sends shop information to clients, and the clients then send shop information to the WeChat server for verification. After the verification succeeds, the clients visit the authentication URL to initiate authentication on the device. The device obtains shop information in either of the following ways:
Automatic mode: Run the wechat-server-ip command to specify the domain name, SSL policy, and port number of the WeChat server. After you configure the WeChat server information, the device will automatically obtain shop information from the WeChat server.
When WeChat authentication is required in a large number of shops, the automatic mode is recommended for convenient management and maintenance.
Manual mode: Run the shop-id command to configure shop information.
If both two commands are configured, the configuration of the shop-id command does not take effect.
Prerequisites
An SSL policy has been created using the ssl policy policy-name type client command in the system view.
You have obtained a digital certificate for the SSL policy from an authorized certificate authority.
Follow-up Procedure
Run the polling-time command to set the interval for obtaining shop information from the WeChat server.
Example
# Set the WeChat server domain name to api.weixin1.qq.com, SSL policy name to weixin, and TCP port number to 8080.
<AC6605> system-view [AC6605] pki realm weixin [AC6605-pki-realm-weixin] quit [AC6605] ssl policy weixin type client [AC6605-ssl-policy-weixin] server-verify enable [AC6605-ssl-policy-weixin] pki-realm weixin [AC6605-ssl-policy-weixin] quit [AC6605] portal local-server wechat-authen [AC6605-wechat-authen] wechat-server-ip url api.weixin1.qq.com ssl-policy weixin port 8080