feat: make x-zitadel-orgid optional (resource owner by default) (#1591)

This commit is contained in:
Livio Amstutz 2021-04-15 10:57:01 +02:00 committed by GitHub
parent 05c6d0688a
commit c7e7ef8e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,