p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
https://phasetwo.io
Other
417 stars 72 forks source link

Add attributes to Invitation #151

Closed xgp closed 9 months ago

xgp commented 10 months ago

Some invitation use cases need a way of passing/persisting additional context metadata within the invite, such as additional properties about the user-to-be-invited. The model currently supports a roles[] array; but could benefit a free-form key-value Map<String, String> attributes map (much like many of the other Keycloak models), so that additional context can be passed to the consumer.

In scope:

  1. Add an invitation attributes table to the migrations
  2. Add attributes to the model and representation
  3. Add a new method GET /:realm/orgs/:orgId/invitations/:inviteId to get invitations by id
  4. Make the attributes map available on the FTL context for the invitation email

Out of scope:

  1. Transferring those attributes after the invitation is accepted/denied
  2. Building Admin UI or Admin Portal UI to allow setting and/or viewing the attributes (maybe in the future)
xgp commented 10 months ago

cc @phamann

xgp commented 9 months ago

fixed in #153