Class ScimResourceStore

java.lang.Object
org.mockserver.scim.ScimResourceStore

public class ScimResourceStore extends Object
In-memory state backing the mock SCIM 2.0 provider.

Holds one ScimResourceStore.Provider per registered basePath (e.g. /scim/v2). Each provider owns a Users and a Groups CrudDataStore plus the per-provider enforcement flags (bearer token, filter, patch). The SCIM class callbacks are instantiated fresh per request and therefore cannot share instance state, so they resolve their provider here by the request path.

This is a process-wide singleton, mirroring OidcAuthorizationStore and the other in-memory registries. reset() clears all providers and is wired into HttpState.reset().

  • Method Details

    • getInstance

      public static ScimResourceStore getInstance()
    • registerProvider

      public void registerProvider(ScimResourceStore.Provider provider)
      Registers (or replaces) the provider serving the given base path. The most recently registered provider for a base path wins, so re-running PUT /mockserver/scim with the same base path refreshes the seeded data and enforcement flags.
    • providerForRequestPath

      public ScimResourceStore.Provider providerForRequestPath(String requestPath)
      Finds the provider whose base path is the longest prefix of the given request path, or null if none registered. Longest-prefix matching lets overlapping base paths coexist.
    • providerForBasePath

      public ScimResourceStore.Provider providerForBasePath(String basePath)
    • reset

      public void reset()