@@ -54,6 +54,23 @@ bool ICACHE_FLASH_ATTR check_memleak_debug_enable(void)
54
54
}
55
55
#endif
56
56
57
+ //Function that tells the authentication system what users/passwords live on the system.
58
+ //This is disabled in the default build; if you want to try it, enable the authBasic line in
59
+ //the builtInUrls below.
60
+ int myPassFn (HttpdConnData * connData , int no , char * user , int userLen , char * pass , int passLen ) {
61
+ if (no == 0 ) {
62
+ os_strcpy (user , "admin" );
63
+ os_strcpy (pass , "s3cr3t" );
64
+ return 1 ;
65
+ //Add more users this way. Check against incrementing no for each user added.
66
+ // } else if (no==1) {
67
+ // os_strcpy(user, "user1");
68
+ // os_strcpy(pass, "something");
69
+ // return 1;
70
+ }
71
+ return 0 ;
72
+ }
73
+
57
74
/*
58
75
This is the main url->function dispatching data struct.
59
76
In short, it's a struct with various URLs plus their handlers. The handlers can
@@ -217,21 +234,3 @@ user_init(void) {
217
234
system_show_malloc ();
218
235
#endif
219
236
}
220
-
221
- //Function that tells the authentication system what users/passwords live on the system.
222
- //This is disabled in the default build; if you want to try it, enable the authBasic line in
223
- //the builtInUrls below.
224
- int myPassFn (HttpdConnData * connData , int no , char * user , int userLen , char * pass , int passLen ) {
225
- if (no == 0 ) {
226
- os_strcpy (user , "admin" );
227
- os_strcpy (pass , "s3cr3t" );
228
- return 1 ;
229
- //Add more users this way. Check against incrementing no for each user added.
230
- // } else if (no==1) {
231
- // os_strcpy(user, "user1");
232
- // os_strcpy(pass, "something");
233
- // return 1;
234
- }
235
- return 0 ;
236
- }
237
-
0 commit comments