oauth2.dev

locale

OpenID_Foundation_Artifact_Binding_Working_Group

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

MAY
1
  1. 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

info

Treat underscore-separated locale values such as en_US as acceptable only if the implementation chooses to support the OpenID Connect compatibility syntax.

info

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