@lastshotlabs/slingshot-scim
npm install @lastshotlabs/slingshot-scim
Functions
Section titled “Functions”createScimPlugin
Section titled “createScimPlugin”Creates the slingshot-scim plugin, which adds SCIM 2.0 user provisioning to a Slingshot app.
Requires slingshot-auth to be installed and configured with auth.scim settings in the
auth plugin config. Routes are mounted at /scim/v2/* during setupRoutes.
Supported SCIM 2.0 endpoints:
GET /scim/v2/Users— list/search users with single-clause filter supportGET /scim/v2/Users/:id— retrieve a single userPOST /scim/v2/Users— provision a new userPUT /scim/v2/Users/:id— full user replacementPATCH /scim/v2/Users/:id— partial update (PatchOp)DELETE /scim/v2/Users/:id— deprovision (suspend or hard-delete, configurable)GET /scim/v2/ServiceProviderConfig— capability discoveryGET /scim/v2/ResourceTypes— resource type discovery
function createScimPlugin(): SlingshotPluginSource: packages/slingshot-scim/src/plugin.ts
createScimRouter
Section titled “createScimRouter”Rate-limit options applied to SCIM read endpoints (GET /scim/v2/Users, etc.).
100 requests per minute per client IP.
function createScimRouter(runtime: AuthRuntimeContext): voidSource: packages/slingshot-scim/src/routes/scim.ts
parseScimFilter
Section titled “parseScimFilter”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
function parseScimFilter(filter?: string): UserQuery | nullSource: packages/slingshot-scim/src/lib/scim.ts
scimError
Section titled “scimError”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
function scimError(status: number, detail: string, scimType?: string): ResponseSource: packages/slingshot-scim/src/lib/scim.ts
userRecordToScim
Section titled “userRecordToScim”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
function userRecordToScim(user: UserRecord, config?: { userName?: 'email' | 'username' },): ScimUserSource: packages/slingshot-scim/src/lib/scim.ts
Interfaces
Section titled “Interfaces”ScimError
Section titled “ScimError”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
Source: packages/slingshot-scim/src/lib/scim.ts
ScimListResponse
Section titled “ScimListResponse”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
Source: packages/slingshot-scim/src/lib/scim.ts
ScimUser
Section titled “ScimUser”A SCIM 2.0 User resource as defined by RFC 7643 §4.1.
Returned by the /scim/v2/Users endpoints in JSON response bodies.
Source: packages/slingshot-scim/src/lib/scim.ts