diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec
index b10019f..a360e21 100644
--- a/Build/MQTTnet.nuspec
+++ b/Build/MQTTnet.nuspec
@@ -11,6 +11,8 @@
false
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker) and supports v3.1.0, v3.1.1 and v5.0.0 of the MQTT protocol.
+* [Server] Added items dictionary to client session in order to share data across interceptors as along as the session exists.
+* [Server] Exposed CONNECT packet properties in Application Message and Subscription interceptor.
* [MQTTnet.Server] Added REST API for publishing basic messages.
Copyright Christian Kratky 2016-2019
diff --git a/Source/MQTTnet.Server/Mqtt/MqttApplicationMessageInterceptor.cs b/Source/MQTTnet.Server/Mqtt/MqttApplicationMessageInterceptor.cs
index c5f3afd..8d378af 100644
--- a/Source/MQTTnet.Server/Mqtt/MqttApplicationMessageInterceptor.cs
+++ b/Source/MQTTnet.Server/Mqtt/MqttApplicationMessageInterceptor.cs
@@ -24,12 +24,18 @@ namespace MQTTnet.Server.Mqtt
{
var pythonContext = new PythonDictionary
{
+ { "client_id", context.ClientId },
+ { "retain", context.ApplicationMessage.Retain },
+ { "username", context.Username },
+ { "password", context.Password },
+ { "raw_password", new Bytes(context.RawPassword ?? new byte[0]) },
+ { "clean_session", context.CleanSession},
+ { "authentication_method", context.AuthenticationMethod},
+ { "authentication_data", new Bytes(context.AuthenticationData ?? new byte[0]) },
{ "accept_publish", context.AcceptPublish },
{ "close_connection", context.CloseConnection },
- { "client_id", context.ClientId },
{ "topic", context.ApplicationMessage.Topic },
- { "qos", (int)context.ApplicationMessage.QualityOfServiceLevel },
- { "retain", context.ApplicationMessage.Retain }
+ { "qos", (int)context.ApplicationMessage.QualityOfServiceLevel }
};
_pythonScriptHostService.InvokeOptionalFunction("on_intercept_application_message", pythonContext);
diff --git a/Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs b/Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs
index 5612601..c33580e 100644
--- a/Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs
+++ b/Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs
@@ -1,8 +1,11 @@
-namespace MQTTnet.Server
+using System.Collections.Generic;
+using MQTTnet.Packets;
+
+namespace MQTTnet.Server
{
- public class MqttApplicationMessageInterceptorContext
+ public class MqttApplicationMessageInterceptorContext : MqttBaseInterceptorContext
{
- public MqttApplicationMessageInterceptorContext(string clientId, MqttApplicationMessage applicationMessage)
+ public MqttApplicationMessageInterceptorContext(string clientId, IDictionary