-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul deserialization of claims and client metadata
Previously, there were two issues with the deserialization of claims and dynamic client registration metadata: 1. Explicit `null` JSON values provided for optional fields resulted in deserialization errors. The spec states that identity providers "SHOULD NOT" pass `null` values for optional fields (see https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse). Rather, those fields should be omitted altogether. However, it makes sense for this crate to deserialize both representations as `None`. 2. When deserialization errors occurred while deserializing specific fields, the error message did not include the name of the field. This crate uses `serde_path_to_error` to provide helpful error messages, but the custom deserializer used to support localized claims has no way to inform `serde_path_to_error` about the key of the JSON map field being deserialized. Instead, this change explicitly prefixes deserialization errors with the key to provide equivalent diagnostic information to the user. Fixes #184.
- Loading branch information
Showing
9 changed files
with
578 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.