Modified a few for Example3

This commit is contained in:
sta 2014-11-19 10:44:17 +09:00
parent 0f54146e65
commit f4f50de125

View File

@ -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.
}; };
*/ */