Other Parts Discussed in Thread: EK-TM4C1294XL
Hi All,
I have encountered user account issue on HTTP server.
I can initialize user account by adding following code at .cfg file
====
var admin = new Global.Account();
admin.username = "admin";
admin.password = "admin";
Global.addUserAccount(admin);
======
This could be initial account, but I think admin could add user account or change account info at runtime.
I have tried following code added at AddWebFiles(), but not working.
and I have tried with REALM1 -> REALM2, still not working.
only admin/admin is OK.
======
CI_ACCT CA;
int rc;
HANDLE hCfg;
hCfg = CfgGetDefault();
// Creates the Authorization Realm 1
rc = CfgAddEntry(hCfg, CFGTAG_SYSINFO, CFGITEM_SYSINFO_REALM1, 0, 7, (UINT8 *)"REALM1", 0);
strcpy(CA.Username, "user");
strcpy(CA.Password, "0123");
CA.Flags = CFG_ACCTFLG_CH1; // Adds the user the the Realm 1
rc = CfgAddEntry(hCfg, CFGTAG_ACCT, CFGITEM_ACCT_REALM, 0, sizeof(CI_ACCT), (UINT8 *)&CA, 0);
======
How can I add or change user account info for HTTP server in runtime ?
Thanks in advance.
Best Regards,
Hae Ryong