mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
feat: make x-zitadel-orgid optional (resource owner by default) (#1591)
This commit is contained in:
parent
05c6d0688a
commit
c7e7ef8e74
@ -80,6 +80,9 @@ func VerifyTokenAndCreateCtxData(ctx context.Context, token, orgID string, t *To
|
|||||||
if err := checkOrigin(ctx, origins); err != nil {
|
if err := checkOrigin(ctx, origins); err != nil {
|
||||||
return CtxData{}, err
|
return CtxData{}, err
|
||||||
}
|
}
|
||||||
|
if orgID == "" {
|
||||||
|
orgID = resourceOwner
|
||||||
|
}
|
||||||
return CtxData{
|
return CtxData{
|
||||||
UserID: userID,
|
UserID: userID,
|
||||||
OrgID: orgID,
|
OrgID: orgID,
|
||||||
|
Loading…
Reference in New Issue
Block a user