This repository has been archived on 2024-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
rocketchat-scim/ScimApp.ts

36 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2022-02-09 15:35:37 +00:00
import {
IAppAccessors,
IConfigurationExtend,
ILogger,
} from "@rocket.chat/apps-engine/definition/accessors";
import {
ApiSecurity,
ApiVisibility,
} from "@rocket.chat/apps-engine/definition/api";
import { App } from "@rocket.chat/apps-engine/definition/App";
import { IAppInfo } from "@rocket.chat/apps-engine/definition/metadata";
2022-02-15 13:09:03 +00:00
import { GroupEndpoint } from "./src/endpoints/GroupEndpoint";
import { GroupsEndpoint } from "./src/endpoints/GroupsEndpoint";
2022-02-09 15:35:37 +00:00
2022-02-15 13:09:03 +00:00
import { UserEndpoint } from "./src/endpoints/UserEndpoint";
import { UsersEndpoint } from "./src/endpoints/UsersEndpoint";
2022-02-09 15:35:37 +00:00
export class ScimApp extends App {
constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
super(info, logger, accessors);
}
public async extendConfiguration(configuration: IConfigurationExtend) {
configuration.api.provideApi({
visibility: ApiVisibility.PUBLIC,
security: ApiSecurity.UNSECURE,
2022-02-15 12:38:33 +00:00
endpoints: [
new UsersEndpoint(this),
new UserEndpoint(this),
new GroupsEndpoint(this),
new GroupEndpoint(this),
],
2022-02-09 15:35:37 +00:00
});
2022-02-15 15:16:51 +00:00
}
2022-02-09 15:35:37 +00:00
}