Fix gestione deserializzazione claims

This commit is contained in:
Samuele Locatelli
2023-08-01 09:47:34 +02:00
parent c2bd127b64
commit 632e2005ee
6 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>WebDoorCreator - Egalware</i>
<h4>Version: 0.9.2308.0108</h4>
<h4>Version: 0.9.2308.0109</h4>
<br /> Release note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2308.0108
0.9.2308.0109
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2308.0108</version>
<version>0.9.2308.0109</version>
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>
@@ -82,5 +82,6 @@ namespace WebDoorCreator.API.Controllers
}
#endregion Private Methods
}
}
+9 -11
View File
@@ -22,27 +22,25 @@ namespace WebDoorCreator.Data.User
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
JObject jo = JObject.Load(reader);
string type = (string)jo["Type"];
string value = (string)jo["Value"];
string valueType = (string)jo["ValueType"];
string issuer = (string)jo["Issuer"];
string originalIssuer = (string)jo["OriginalIssuer"];
JObject jObj = JObject.Load(reader);
string type = $"{jObj["Type"]}";
string value = $"{jObj["Value"]}";
string valueType = $"{jObj["ValueType"]}";
string issuer = $"{jObj["Issuer"]}";
string originalIssuer = $"{jObj["OriginalIssuer"]}";
return new Claim(type, value, valueType, issuer, originalIssuer);
}
public override bool CanWrite
{
get { return false; }
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
{
#if false
// lascio eccezione perché è un deserializzatore "in sola lettura"
throw new NotImplementedException();
#endif
// da verificare
writer.WriteValue(JsonConvert.SerializeObject(value));
}
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>0.9.2308.0108</Version>
<Version>0.9.2308.0109</Version>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
</PropertyGroup>