Modified a few for README.md
This commit is contained in:
parent
34648413e5
commit
bf05b66d76
@ -471,7 +471,7 @@ wssv.Realm = "WebSocket Test";
|
|||||||
wssv.UserCredentialsFinder = id => {
|
wssv.UserCredentialsFinder = id => {
|
||||||
var expected = "nobita";
|
var expected = "nobita";
|
||||||
return id.Name == expected
|
return id.Name == expected
|
||||||
? new NetworkCredential (expected, "password", "gunfighter") // User name, password, and roles
|
? new NetworkCredential (expected, "password", "gunfighter") // User name, password, and roles.
|
||||||
: null; // If the user credentials aren't found.
|
: null; // If the user credentials aren't found.
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@ -521,7 +521,7 @@ public class Chat : WebSocketBehavior
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
And if you would like to check the **Origin header**, **Cookies**, or both included in each WebSocket connection request, you should set each validation with your `WebSocketBehavior`, for example, using the `AddWebSocketService<TBehavior> (string, Func<TBehavior>)` method with initializing, like the following.
|
And if you would like to validate the **Origin header**, **Cookies**, or both included in each WebSocket connection request, you should set each validation with your `WebSocketBehavior`, for example, using the `AddWebSocketService<TBehavior> (string, Func<TBehavior>)` method with initializing, like the following.
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
wssv.AddWebSocketService<Chat> (
|
wssv.AddWebSocketService<Chat> (
|
||||||
|
Loading…
Reference in New Issue
Block a user