1 |
1 |
2 return function (stream, mechanisms, preference) |
2 return function (stream, name) |
3 if stream.username and stream.password then |
3 if name == "PLAIN" and stream.username and stream.password then |
4 mechanisms["PLAIN"] = function (stream) |
4 return function (stream) |
5 return "success" == coroutine.yield("\0"..stream.username.."\0"..stream.password); |
5 return "success" == coroutine.yield("\0"..stream.username.."\0"..stream.password); |
6 end; |
6 end, 5; |
7 preference["PLAIN"] = 5; |
|
8 end |
7 end |
9 end |
8 end |
10 |
9 |