openidconnect-rs icon indicating copy to clipboard operation
openidconnect-rs copied to clipboard

Examples of the LocalisedClaim

Open Firstyear opened this issue 2 years ago • 1 comments

https://docs.rs/openidconnect/3.2.0/openidconnect/struct.IdTokenClaims.html#method.name (aka the displayname) can be localised. However, due to the stronglytyped API it's difficult to see "how" to access this via https://docs.rs/openidconnect/3.2.0/openidconnect/struct.LocalizedClaim.html.

For example, if a locale doesn't exist, then how can a default locale be accessed as a fallback?

I think it would be useful to have examples of accessing localised claims in this section to assist developers to access these data.

Firstyear avatar Jul 08 '23 08:07 Firstyear