simpleidserver / SimpleIdServer

OpenID, OAuth 2.0, SCIM2.0, UMA2.0, FAPI, CIBA & OPENBANKING Framework for ASP.NET Core
https://simpleidserver.com/
Apache License 2.0
693 stars 91 forks source link

[SCIM] Azure Service Bus Notification issue on 4.0.4 #576

Closed gabrielemilan closed 10 months ago

gabrielemilan commented 10 months ago

Hello,

I noticed an issue on MassTransit notification on Azure Service Bus. The payload of the message is partially empty:

image

I tried to change this code:

public JObject Representation { get { return string.IsNullOrWhiteSpace(SerializedRepresentation) ? null : JObject.Parse(SerializedRepresentation); } } to

public JsonObject Representation { get { return string.IsNullOrWhiteSpace(SerializedRepresentation) ? null : JsonNode.Parse(SerializedRepresentation).AsObject(); } }

using builtin System.Text.Json.Nodes and it works fine:

image

I don't know, maybe is my configuration issue.

Regards.

simpleidserver commented 10 months ago

Hello,

The Representation property should not be serialized into JSON by Masstransit. Integration events are consumed by clients, and deserialization must occur on the client side. Would it be acceptable to you if we decorate the property with a JsonIgnore attribute to skip the serialization?

KR,

SID

simpleidserver commented 10 months ago

You can see the changes here : https://github.com/simpleidserver/SimpleIdServer/commit/0bc6ab60e2f53f1549273a21a2660b9a84376bbd#diff-30e8359a09af336b70c23ac90cf902b6ec5eac596308042a93995743bb58dfe1R31

gabrielemilan commented 10 months ago

Ok, but I think will be not retro-compatible with the previous version, isn't it?

simpleidserver commented 10 months ago

This modification is backward-compatible with the previous version and has no impact. The serialized message will now contain only one Representation, not two

gabrielemilan commented 10 months ago

ok thanks, can you tell me the ETA?

simpleidserver commented 10 months ago

I can publish the Nuget package tomorrow afternoon (14/09) :)

simpleidserver commented 10 months ago

The Nuget package version "4.0.4-rc2" is published ! You can download it here : https://www.nuget.org/packages/SimpleIdServer.Scim/4.0.4-rc2