Brief description:
Login authentication
Request URL:
WebAPI/Login/ClientLogin
Request method:
POST
Parameter:
Login demo reference
https://gitee.com/ucgsai/RSADemo
Fixed public key:
publicKey = -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArfOzx+LjKF+BZKcbriPu
rWwmlrif+fQvZyqQq6hG8SWZRE52Ahp++3Fem79XdAu3U5jumvOeEKAfXMCClsfV G9EqhLNSVA7Xb8zgnVelSHMPg9r2LX73nPSK28r3SoHAAuVNrva8f94koCYV8zym I6W3duhDL/bfQDUkFS3MJcUb8bQcaxupKPLkxImBYGAjI3ceSMi984CFCcS8D6yU tWGnxqy/nZVrfws7eI72FSpa2JaWkp7Bqm27bAMnirMx27rRN9uatHLjGBS60yrO kZ1UJDkffi9tyOEIaEbNvUJWMH9rSAqiMpWH9Qdo9Vre4heMwNaxcFheYfty/o8Q aQIDAQAB -----END PUBLIC KEY-----
rsa encryption example
jsencrypt library address jsencrypt library address
// * Encrypt with a fixed private key
function RSA_Pkey_encrypt() {
var encrypt1 = new JSEncrypt();
encrypt1.setPublicKey(publicKey);
return encrypt1
};
Loginciphertext = RSA_Pkey_encrypt().encrypt([account set name, operator, password].join(','));
Back to example
{
"RetCode": 1,
"ErrCode": 0,
"ErrDesc": '',
"RetData": {
"AKeyciphertext":"LgfkxLz5PI1NZIFIFkQCi8vk1wKUgdspr3p+PXGqkPbTLYkc7nOBcrRa2RfGWx6m164NzH+SPpRXhKltyXbgTi1iV3L4J9VUrGzYrBnbXlIMjNrORyIhaSuBfonmU1bbCmKdVyY5X5h9FKobiTD/yXjIQtfWHYsyQizHd6fjtHn97nAOjoq7Pn6RYJOw9VMCe0EQcJo/G7GHMlrHYKHhuQe+7b3M8kxvaUa0301q8FOf+gKXH42GoKrKGQdePj8e+e2x1YqSO9KU9XfjcIqqNq1F6yeNXUXe5SOoTA8RDJleKslbYE4ZaO8JIKvUl0uEosKHZvxkrL8UaIsTrGDnxw==",
"AKey":"y0nwf9aU4hRq+NGwkssvS1XEZ+nIzai7darV/RMDNJw=",
"AIV":"MIvf2rgeT/AJCpZ/Tg9pLg==",
"SHA256":"49EE808BCE5DCED2B7F5C25172348D89264F576599DB6E0E1C619B0BB6754316"
}
}

Return parameter description
RetCode: 1--indicates success; 0--indicates failure;
operator ID: integer value;
Note After successful login, the system will record the cookie with the key of WebUser generated by the http request, and return the cookie. The cookie is valid for 1 hour. Please carry this cookie with you when you initiate an HTTP request next time.
If the cookie expires or does not carry the cookie, you need to log in again. If an http request is made within half an hour of the cookie remaining, the server will renew the cookie.
ErrCode Error code dictionary:
