Fix gestione deserializzazione claims
This commit is contained in:
@@ -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 @@
|
||||
0.9.2308.0108
|
||||
0.9.2308.0109
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user