Feat: Org Scoped JWT Tokens

This commit is contained in:
Daniel Hougaard
2024-03-17 18:48:09 +01:00
parent 716e705c2a
commit 4a0668e92e
@@ -429,6 +429,15 @@ export const scimServiceFactory = ({
}); });
} }
const organization = await orgDAL.findById(scimToken.orgId);
if (!organization.scimEnabled) {
throw new ScimRequestError({
detail: "SCIM is disabled for the organization",
status: 403
});
}
return { scimTokenId: scimToken.id, orgId: scimToken.orgId }; return { scimTokenId: scimToken.id, orgId: scimToken.orgId };
}; };