Closed ymwjbxxq closed 2 years ago
I have fixed the problem
let token_data = decode::<Value>(
&token,
&key,
&validation,
).unwrap();
let result: Claims = serde_json::from_value(token_data.claims)?;
Not sure why but great
Hello,
I cannot understand where the problem is, so I try here.
The claiming structure is like this (not standard):
If I decode with jwt.io the token, I get a payload data and if I write a unit test, I can deserialize correctly.
When I use decode functionality:
I get the error:
Err
value: Error(Json(Error("duplicate fieldresource_access
",`But if I remove "resource_access" from the Claim struct, it is all passing.
Any idea of what I am doing wrong?
Thanks, Dan