mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-14 14:32:16 +00:00
fix(oidc): add missing fields to introspection (#6967)
during QA I found some user info and org ID was missing. This change adds those missing fields.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
-- deallocate q;
|
||||
-- prepare q (text, text, text[]) as
|
||||
|
||||
with usr as (
|
||||
select u.id, u.creation_date, u.change_date, u.sequence, u.state, u.resource_owner, u.username, n.login_name as preferred_login_name
|
||||
from projections.users9 u
|
||||
@@ -11,7 +8,7 @@ with usr as (
|
||||
),
|
||||
human as (
|
||||
select $1 as user_id, row_to_json(r) as human from (
|
||||
select first_name, last_name, nick_name, display_name, avatar_key, email, is_email_verified, phone, is_phone_verified
|
||||
select first_name, last_name, nick_name, display_name, avatar_key, preferred_language, gender, email, is_email_verified, phone, is_phone_verified
|
||||
from projections.users9_humans
|
||||
where user_id = $1
|
||||
and instance_id = $2
|
||||
@@ -56,7 +53,7 @@ orgs as (
|
||||
-- find the user's org
|
||||
user_org as (
|
||||
select row_to_json(r) as organization from (
|
||||
select name, primary_domain
|
||||
select o.id, o.name, o.primary_domain
|
||||
from orgs o
|
||||
join usr u on o.id = u.resource_owner
|
||||
) r
|
||||
@@ -88,5 +85,3 @@ select json_build_object(
|
||||
'metadata', (select metadata from metadata),
|
||||
'user_grants', (select grants from grants)
|
||||
);
|
||||
|
||||
-- execute q('231965491734773762','230690539048009730', '{"236645808328409090","240762134579904514"}')
|
||||
Reference in New Issue
Block a user