Feat: Org Scoped JWT Tokens

This commit is contained in:
Daniel Hougaard
2024-03-09 08:56:13 +01:00
parent 716e705c2a
commit 4a0668e92e

View File

@@ -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 };
};