Closed davidv1992 closed 1 year ago
Hi @davidv1992,
As the error indicates, a sequence (JSON array) is expected at offset 273 of the ID token's decoded JSON blob, which corresponds to the amr
claim ("simulator"
).
The spec defines the amr
claim unambiguously as a JSON array of strings:
OPTIONAL. Authentication Methods References. JSON array of strings that are identifiers for authentication methods used in the authentication. For instance, values might indicate that both password and OTP authentication methods were used. The definition of particular values to be used in the
amr
Claim is beyond the scope of this specification. Parties using this claim will need to agree upon the meanings of the values used, which may be context-specific. Theamr
value is an array of case sensitive strings.
By providing a JSON string instead of an array of strings, this ID token is invalid. Unfortunately, there's no easy workaround since rewriting the JWT at the HTTP client layer would cause the ID token's signature validation to fail. I think you'll need to reach out to the OIDC provider to get them to follow the spec in order to interoperate with this crate.
Ah thank you for the information, that explains a lot. I will contact the provider.
I am requesting a token id that contains the
subject_issuer
field. However, when executing the request withclient.exchange_code
, I get the following parse error back:Looking at the raw request data in there, this looks completely valid to me:
The decoded tokenid looks like this:
Am I doing something weird/wrong or is this a bug in the library? I am using openidconnect version 3.0
Note: All data above is test data, and does not contain actual person identifying data.