gristlabs_grist-core/app/server/lib/scim/index.ts
fflorent 92b4a65da0 WIP
2024-10-18 14:42:52 +02:00

25 lines
737 B
TypeScript

import * as express from 'express';
import { buildUsersRoute, checkPermissionToUsersEndpoint } from './v2/users';
import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager';
import SCIMMY from "scimmy";
import SCIMMYRouters from "scimmy-routers";
type SCIMMYResource = typeof SCIMMY.Types.Resource;
const buildScimRouter = (dbManager: HomeDBManager) => {
const v2 = express.Router();
v2.use('/Users', checkPermissionToUsersEndpoint, buildUsersRoute(dbManager));
SCIMMY.Resources.User.ingress(handler)
SCIMMY.Resources.declare(SCIMMY.Resources.User)
.ingress((resource: SCIMMYResource, data) => {
});
const scim = express.Router();
scim.use('/v2', v2);
return scim;
};
export { buildScimRouter };