Modified a few for Example3
This commit is contained in:
parent
0f54146e65
commit
f4f50de125
@ -36,9 +36,11 @@ namespace Example3
|
|||||||
httpsv.AuthenticationSchemes = AuthenticationSchemes.Basic;
|
httpsv.AuthenticationSchemes = AuthenticationSchemes.Basic;
|
||||||
httpsv.Realm = "WebSocket Test";
|
httpsv.Realm = "WebSocket Test";
|
||||||
httpsv.UserCredentialsFinder = id => {
|
httpsv.UserCredentialsFinder = id => {
|
||||||
var expected = "nobita";
|
var name = id.Name;
|
||||||
return id.Name == expected
|
|
||||||
? new NetworkCredential (expected, "password", "gunfighter")
|
// Return user name, password, and roles.
|
||||||
|
return name == "nobita"
|
||||||
|
? new NetworkCredential (name, "password", "gunfighter")
|
||||||
: null; // If the user credentials aren't found.
|
: null; // If the user credentials aren't found.
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user