npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maroonedsoftware/scim

v0.1.10

Published

SCIM 2.0 (RFC 7643/7644) server toolkit for ServerKit — schemas, filter parser, PATCH applier, error envelope, and a Koa router with abstract repositories.

Downloads

1,289

Readme

@maroonedsoftware/scim

SCIM 2.0 (RFC 7643/7644) server toolkit for ServerKit.

This package provides the protocol layer — schemas, filter parser, PATCH applier, error envelope, and a Koa router — for building a SCIM server. Resource storage is left to the consumer via abstract repositories, matching the pattern used by @maroonedsoftware/authentication and @maroonedsoftware/permissions.

What's included

  • Resource schemasUser, Group, and the EnterpriseUser extension (RFC 7643).
  • Filter parser — full SCIM filter grammar (RFC 7644 §3.4.2.2) returning a typed AST.
  • PATCH applieradd / replace / remove ops with the path mini-language (RFC 7644 §3.5.2).
  • Error envelopescimError(status, scimType?) builder producing the SCIM error JSON.
  • Abstract repositoriesScimUserRepository, ScimGroupRepository. The consumer implements these against their datastore.
  • ServicesScimUserService, ScimGroupService, ScimServiceProviderService.
  • Koa middlewarescimErrorMiddleware(), scimContentTypeMiddleware(), requireScimScope(scope).
  • Router factorycreateScimRouter(options) mounting the standard SCIM endpoints.

Quick start

import Koa from 'koa';
import { ServerKitContext, serverKitContextMiddleware, authenticationMiddleware } from '@maroonedsoftware/koa';
import { createScimRouter, ScimUserRepository, ScimGroupRepository, scimErrorMiddleware } from '@maroonedsoftware/scim';

class MyScimUserRepository extends ScimUserRepository {
  // implement against your datastore
}

class MyScimGroupRepository extends ScimGroupRepository {
  // implement against your datastore
}

const app = new Koa();
app.use(serverKitContextMiddleware(container));
app.use(authenticationMiddleware());

const scimRouter = createScimRouter({
  userRepository: new MyScimUserRepository(),
  groupRepository: new MyScimGroupRepository(),
  basePath: '/scim/v2',
  serviceProviderConfig: {
    documentationUri: 'https://example.com/scim/docs',
    patch: { supported: true },
    bulk: { supported: false, maxOperations: 0, maxPayloadSize: 0 },
    filter: { supported: true, maxResults: 200 },
    changePassword: { supported: false },
    sort: { supported: true },
    etag: { supported: false },
  },
});

app.use(scimErrorMiddleware());
app.use(scimRouter.routes());

Authentication

This package does not validate bearer tokens itself. It reads ctx.authenticationSession (populated by authenticationMiddleware() from @maroonedsoftware/koa) and provides a requireScimScope(scope) guard that checks for SCIM scopes on session.claims.scimScopes. You register an AuthenticationSchemeHandler in your app that turns IdP-issued bearer tokens into a session.

Compliance testing

The router has been designed against RFC 7643/7644. To validate against a real IdP, point Okta or scim2-compliance-test-utils at a sample app that mounts createScimRouter.