AshScim.Projection (ash_scim v0.1.0)

Copy Markdown View Source

Applies the SCIM attributes / excludedAttributes query parameters to an encoded resource map (RFC 7644 ยง3.4.2.5).

  • attributes=a,b,c โ€” only the named attributes are returned, plus the always-required id, schemas, and meta.
  • excludedAttributes=a,b,c โ€” the named attributes are stripped, but id, schemas, and meta always come through.

Dotted paths address sub-attributes of complex objects, e.g. attributes=name.givenName returns only name: {givenName: ...}.

Summary

Functions

Project an encoded SCIM resource map according to the request's selection query params.

Functions

apply(resource, query_params)

@spec apply(%{required(String.t()) => term()}, %{required(String.t()) => term()}) ::
  %{
    required(String.t()) => term()
  }

Project an encoded SCIM resource map according to the request's selection query params.

Pass the parsed query-param map (as Plug.Conn.fetch_query_params/1 would produce) so that empty/missing values become a no-op.