[Modify] Polish it
This commit is contained in:
parent
f4d76318f6
commit
2a72bef65d
@ -484,13 +484,13 @@ namespace WebSocketSharp.Server
|
|||||||
/// authenticate a client.
|
/// authenticate a client.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <c>Func<<see cref="IIdentity"/>, <see cref="NetworkCredential"/>></c> delegate that
|
/// A <c>Func<<see cref="IIdentity"/>, <see cref="NetworkCredential"/>></c> delegate
|
||||||
/// references the method(s) used to find the credentials. The default value is a function that
|
/// that references the method(s) used to find the credentials. The default value is
|
||||||
/// only returns <see langword="null"/>.
|
/// <see langword="null"/>.
|
||||||
/// </value>
|
/// </value>
|
||||||
public Func<IIdentity, NetworkCredential> UserCredentialsFinder {
|
public Func<IIdentity, NetworkCredential> UserCredentialsFinder {
|
||||||
get {
|
get {
|
||||||
return _credFinder ?? (_credFinder = identity => null);
|
return _credFinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
@ -620,7 +620,7 @@ namespace WebSocketSharp.Server
|
|||||||
state => {
|
state => {
|
||||||
try {
|
try {
|
||||||
var ctx = cl.GetWebSocketContext (null, _secure, _sslConfig, _logger);
|
var ctx = cl.GetWebSocketContext (null, _secure, _sslConfig, _logger);
|
||||||
if (!ctx.Authenticate (_authSchemes, getRealm (), UserCredentialsFinder))
|
if (!ctx.Authenticate (_authSchemes, getRealm (), _credFinder))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processRequest (ctx);
|
processRequest (ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user