File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,28 @@ class WebServer
85
85
const String AuthTypeDigest = F(" Digest" );
86
86
const String AuthTypeBasic = F(" Basic" );
87
87
88
- typedef std::function<String * (HTTPAuthMethod mode, String enteredUsername, String extraParams[])> THandlerFunctionAuthCheck;
88
+ /* Callbackhandler for authentication. The extra parameters depend on the
89
+ * HTTPAuthMethod mode:
90
+ *
91
+ * BASIC_AUTH enteredUsernameOrReq contains the username entered by the user
92
+ * param[0] password entered (in the clear)
93
+ * param[1] authentication realm.
94
+ *
95
+ * To return - the password the user entered password is compared to. Or Null on fail.
96
+ *
97
+ * DIGEST_AUTH enteredUsernameOrReq contains the username entered by the user
98
+ * param[0] autenticaiton realm
99
+ * param[1] authentication URI
100
+ *
101
+ * To return - the password of which the digest will be based on for comparison. Or NULL
102
+ * to fail.
103
+ *
104
+ * OTHER_AUTH enteredUsernameOrReq rest of the auth line.
105
+ * params empty array
106
+ *
107
+ * To return - NULL to fail; or any string.
108
+ */
109
+ typedef std::function<String * (HTTPAuthMethod mode, String enteredUsernameOrReq, String extraParams[])> THandlerFunctionAuthCheck;
89
110
90
111
bool authenticate (THandlerFunctionAuthCheck fn);
91
112
bool authenticate (const char * username, const char * password);
You can’t perform that action at this time.
0 commit comments