Browse Source
Update the MongoDB stores to use BsonDocument.Parse() to ensure properties are correctly serialized
pull/712/head
Kévin Chalet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
8 additions and
4 deletions
-
src/OpenIddict.MongoDb/Stores/OpenIddictApplicationStore.cs
-
src/OpenIddict.MongoDb/Stores/OpenIddictAuthorizationStore.cs
-
src/OpenIddict.MongoDb/Stores/OpenIddictScopeStore.cs
-
src/OpenIddict.MongoDb/Stores/OpenIddictTokenStore.cs
|
|
|
@ -16,6 +16,7 @@ using Microsoft.Extensions.Options; |
|
|
|
using MongoDB.Bson; |
|
|
|
using MongoDB.Driver; |
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using OpenIddict.Abstractions; |
|
|
|
using OpenIddict.MongoDb.Models; |
|
|
|
@ -757,7 +758,7 @@ namespace OpenIddict.MongoDb |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
application.Properties = new BsonDocument(properties.ToObject<IDictionary<string, object>>()); |
|
|
|
application.Properties = BsonDocument.Parse(properties.ToString(Formatting.None)); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ using Microsoft.Extensions.Options; |
|
|
|
using MongoDB.Bson; |
|
|
|
using MongoDB.Driver; |
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using OpenIddict.Abstractions; |
|
|
|
using OpenIddict.MongoDb.Models; |
|
|
|
@ -754,7 +755,7 @@ namespace OpenIddict.MongoDb |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
authorization.Properties = new BsonDocument(properties.ToObject<IDictionary<string, object>>()); |
|
|
|
authorization.Properties = BsonDocument.Parse(properties.ToString(Formatting.None)); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ using Microsoft.Extensions.Options; |
|
|
|
using MongoDB.Bson; |
|
|
|
using MongoDB.Driver; |
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using OpenIddict.Abstractions; |
|
|
|
using OpenIddict.MongoDb.Models; |
|
|
|
@ -550,7 +551,7 @@ namespace OpenIddict.MongoDb |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
scope.Properties = new BsonDocument(properties.ToObject<IDictionary<string, object>>()); |
|
|
|
scope.Properties = BsonDocument.Parse(properties.ToString(Formatting.None)); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ using Microsoft.Extensions.Options; |
|
|
|
using MongoDB.Bson; |
|
|
|
using MongoDB.Driver; |
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using OpenIddict.Abstractions; |
|
|
|
using OpenIddict.MongoDb.Models; |
|
|
|
@ -860,7 +861,7 @@ namespace OpenIddict.MongoDb |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
token.Properties = new BsonDocument(properties.ToObject<IDictionary<string, object>>()); |
|
|
|
token.Properties = BsonDocument.Parse(properties.ToString(Formatting.None)); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|