locale
Registry Context
The locale claim identifies the End-User's locale.
Technical Summary
OpenID Connect Core defines locale as a string claim whose value is the End-User's locale, represented as a BCP47 language tag. It notes the usual language-country form such as en-US and allows Relying Parties to accept an underscore separator form for compatibility.
When Used
Used in OpenID Connect UserInfo Responses or ID Tokens to communicate the End-User's locale preference.
Normative Requirements
Relying Parties
openid-connect-core-1_0 - Section 5.1
choose to accept locale values that use an underscore as the separator rather than a dash.
Condition: when processing locale claim values using the compatibility syntax such as en_US
As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.
Validation Guidance
Treat underscore-separated locale values such as en_US as acceptable only if the implementation chooses to support the OpenID Connect compatibility syntax.
Validate ordinary locale values as BCP47 language tags; this is descriptive source guidance, not an uppercase BCP 14 requirement in the cited section.
Reference
Details
- Entry Id
locale- Claim Name
locale- Claim Description
Locale- Change Controller
OpenID_Foundation_ Artifact_ Binding_ Working_ Group - Reference
OpenID Connect Core 1.0 - Section 5.1