Add preferred language to GET /user output

What does this MR do and why?

Add preferred language to GET /user output

This change exposes a current user's preferred language in the GET /user endpoint. It also allows ai_workflow scope to receive current_user information.

References

#548506 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Invoke the class to generate an oauth token with the ai_workflow scope

    Ai::DuoWorkflows::CreateOauthAccessTokenService.new(current_user: User.first).execute
  2. This token can be used to authenticate various endpoints. For example:

     curl --header "Authorization: Bearer $TOKEN_FROM_LAST_STEP" --url "https://gdk.test/api/v4/user"
  3. Ensure that preferred_language data is exposed

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading