|
|
|
|
@ -508,13 +508,13 @@ As a **WebSocket Server**, you should set an HTTP authentication scheme, a realm
|
|
|
|
|
wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
|
|
|
|
|
wssv.Realm = "WebSocket Test";
|
|
|
|
|
wssv.UserCredentialsFinder = id => {
|
|
|
|
|
var name = id.Name;
|
|
|
|
|
var name = id.Name;
|
|
|
|
|
|
|
|
|
|
// Return user name, password, and roles.
|
|
|
|
|
return name == "nobita"
|
|
|
|
|
? new NetworkCredential (name, "password", "gunfighter")
|
|
|
|
|
: null; // If the user credentials aren't found.
|
|
|
|
|
};
|
|
|
|
|
// Return user name, password, and roles.
|
|
|
|
|
return name == "nobita"
|
|
|
|
|
? new NetworkCredential (name, "password", "gunfighter")
|
|
|
|
|
: null; // If the user credentials aren't found.
|
|
|
|
|
};
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you would like to provide the Digest authentication, you should set such as the following.
|
|
|
|
|
|