mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-21 04:03:05 +08:00
Add flag for secure connections.
This commit is contained in:
@@ -298,7 +298,8 @@ namespace MQTTnet.Server
|
||||
connectPacket.Username,
|
||||
connectPacket.Password,
|
||||
connectPacket.WillMessage,
|
||||
clientAdapter.Endpoint);
|
||||
clientAdapter.Endpoint,
|
||||
clientAdapter.IsSecureConnection);
|
||||
|
||||
var connectionValidator = _options.ConnectionValidator;
|
||||
|
||||
|
||||
@@ -4,13 +4,14 @@ namespace MQTTnet.Server
|
||||
{
|
||||
public class MqttConnectionValidatorContext
|
||||
{
|
||||
public MqttConnectionValidatorContext(string clientId, string username, string password, MqttApplicationMessage willMessage, string endpoint)
|
||||
public MqttConnectionValidatorContext(string clientId, string username, string password, MqttApplicationMessage willMessage, string endpoint, bool isSecureConnection)
|
||||
{
|
||||
ClientId = clientId;
|
||||
Username = username;
|
||||
Password = password;
|
||||
WillMessage = willMessage;
|
||||
Endpoint = endpoint;
|
||||
IsSecureConnection = isSecureConnection;
|
||||
}
|
||||
|
||||
public string ClientId { get; }
|
||||
@@ -23,6 +24,8 @@ namespace MQTTnet.Server
|
||||
|
||||
public string Endpoint { get; }
|
||||
|
||||
public bool IsSecureConnection { get; }
|
||||
|
||||
public MqttConnectReturnCode ReturnCode { get; set; } = MqttConnectReturnCode.ConnectionAccepted;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user