ExScimPhoenix
Phoenix integration for ExScim. Provides a full set of SCIM 2.0 HTTP endpoints as Phoenix controllers, along with authentication, content-type negotiation, and tenant resolution plugs.
Installation
Add ex_scim_phoenix to your dependencies:
def deps do
[
{:ex_scim_phoenix, "~> 0.1"}
]
endUsage
Add SCIM routes to your Phoenix router:
defmodule MyAppWeb.Router do
use MyAppWeb, :router
pipeline :scim_api do
plug :accepts, ["json", "scim+json"]
plug ExScimPhoenix.Plugs.ScimContentType
plug ExScimPhoenix.Plugs.ScimAuth
end
scope "/scim/v2" do
pipe_through :scim_api
use ExScimPhoenix.Router
end
endAvailable Plugs
ExScimPhoenix.Plugs.ScimAuth- Authenticates requests via Bearer token or HTTP BasicExScimPhoenix.Plugs.RequireScopes- Enforces authorization scopes per actionExScimPhoenix.Plugs.ScimContentType- Setsapplication/scim+jsonresponse content typeExScimPhoenix.Plugs.ScimTenant- Resolves tenant context from the requestExScimPhoenix.Plugs.RequestLogger- Logs SCIM requests for debugging
Controllers
The router macro registers these controllers automatically:
UserController-/UsersCRUD operationsGroupController-/GroupsCRUD operationsMeController-/Meauthenticated user self-managementSearchController-/.searchPOST-based queriesBulkController-/Bulkbatch operationsSchemaController-/SchemasdiscoveryResourceTypeController-/ResourceTypesdiscoveryServiceProviderConfigController-/ServiceProviderConfigcapabilities