Interface InvitationManager


public interface InvitationManager
  • Method Details

    • create

      OrganizationInvitationModel create(OrganizationModel organization, String email, String firstName, String lastName)
      Creates a new invitation for a user to join an organization. The invitation will use the realm's default action token lifespan.
      Parameters:
      organization - the organization
      email - the email address of the user to invite
      firstName - the first name of the user (optional)
      lastName - the last name of the user (optional)
      Returns:
      the created invitation
    • getById

      Retrieves an invitation by its ID for a specific organization.
      Parameters:
      id - the invitation ID
      Returns:
      the invitation, or null if not found
    • getByEmail

      default OrganizationInvitationModel getByEmail(OrganizationModel organization, String email)
      Retrieves an invitation by email and organization.
      Parameters:
      email - the email address
      organization - the organization
      Returns:
      the invitation, or null if not found
    • getAllStream

      Get all invitations for the given organization.
      Returns:
      a stream of all invitations for the organization
    • remove

      boolean remove(String id)
      Deletes an invitation permanently.
      Parameters:
      id - the invitation ID
      Returns:
      true if successful, false if invitation not found