API Reference ash_scim v#0.1.0
Copy MarkdownModules
AshScim — a SCIM 2.0 server extension for the Ash Framework.
Behaviour for authenticating inbound SCIM requests.
Authenticates SCIM requests using JWTs issued by AshAuthentication.
Authenticates SCIM requests against one or more static bearer tokens.
Returns true when the changeset/query has context.private.ash_scim?
set, which AshScim.Router does for every internal Ash call.
Decodes inbound SCIM 2.0 JSON payloads into Ash action input.
Generates the SCIM 2.0 discovery documents — Schemas (RFC 7643 §7) and
ResourceTypes (RFC 7644 §4) — directly from the resource DSL.
Represents a SCIM complex (object-valued) attribute, declared via the
complex/2 block in the scim section.
Represents a SCIM schema extension (RFC 7643 §3.3): a group of attributes
that live under a separate schema URN key in the resource JSON — e.g. the
enterprise user extension
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User, whose object
carries manager, department, etc.
Represents a single SCIM attribute mapping declared via map/2 in the
scim section of a resource.
Represents a SCIM multi-valued attribute, declared via the multivalued/2
block in the scim section.
Encodes Ash records into SCIM 2.0 JSON-shaped maps using the mappings
declared in the resource's scim section.
Builders for SCIM 2.0 error response bodies (RFC 7644 §3.12).
Parses a SCIM 2.0 filter expression (RFC 7644 §3.4.2.2) directly into the
map-shaped filter input accepted by Ash.Query.filter/2 and
Ash.Filter.parse_input/2.
Marks an Ash resource as a SCIM Group resource per RFC 7643 §4.2.
Igniter helpers used by mix ash_scim.install and friends. None of
these touch runtime introspection — they all read and write the
project's source files via Igniter so the installer can run before
the user's code is compiled.
Introspection for the AshScim.User and AshScim.Group extensions.
Translates a SCIM 2.0 PATCH request body (RFC 7644 §3.5.2) into a structured input describing both attribute updates and relationship-level operations
Parser for SCIM 2.0 PATCH path expressions (RFC 7644 §3.5.2).
Applies the SCIM attributes / excludedAttributes query parameters to an
encoded resource map (RFC 7644 §3.4.2.5).
A Plug that exposes Ash resources as a SCIM 2.0 server.
Fixture for verifying that AshScim.Checks.AshScimInteraction bypasses
policies that would otherwise forbid every action.
Realistic per-source auth implementation: each SCIM client carries a
JWT issued by AshAuthentication, and the JWT contains a custom
scim_source claim identifying which IdP the request is from.
Filters reads to records whose :scim_source matches the request-scoped
scim_source set by the auth implementation. Demonstrates the same
context-flowing-through-to-queries pattern as the changeset side.
Reads the request-scoped scim_source that the auth implementation
put on the conn (then onto the changeset's context by the router) and
writes it onto the new record's :scim_source attribute.
Fixture for verifying that auth-time context flows through to changesets/queries the router builds.
Multi-tenant fixture using Ash's attribute-based multitenancy strategy.
Marks an Ash resource as a SCIM User resource per RFC 7643 §4.1.
Compile-time verifier for multivalued declarations.
Mix Tasks
Installs AshScim. Invoke with mix igniter.install ash_scim