-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tracing to the userprofile controller #1068
Conversation
@@ -109,6 +116,12 @@ public async Task<IActionResult> CreateUserProfile(string hdid, [FromBody] Creat | |||
public IActionResult GetUserProfile(string hdid) | |||
{ | |||
ClaimsPrincipal user = this.httpContextAccessor.HttpContext.User; | |||
var jsonSettings = new JsonSerializerSettings() | |||
{ | |||
Converters = new List<JsonConverter>() { new JsonClaimConverter(), new JsonClaimsPrincipalConverter(), new JsonClaimsIdentityConverter() }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why do we need all of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately the claims serialization is not done by default (no default converters can do it). So these custom converters do the job.
Similar issues: codekoenig/AspNetCore.Identity.DocumentDb#22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests failed
fixed |
Fixes or Implements AB#9358
Status Ready
Description
Added logging to the user profile api. Added new object handlers for claim and identity serialization.
NetwonSoft needs to be used since the current version of .net serializer does not handle claims
https://www.thecodebuzz.com/jsonexception-possible-object-cycle-detected-object-depth/
Testing