Skip to content

[Multi-Tenant] backend tenant service #3123

@njlie

Description

@njlie

The backend should provide a tenant service that other services can use to retrieve tenant information, given an id.

Pseudocode for Tenant service:

CreateOptions {
  publicName: string
  email: string
  apiSecret: string
  idpConsentUrl: string
  idpSecret: string
}

TenantService {
  create: (options: CreateOptions) => Tenant
  get: (id: string) => Tenant
  update(id: string, input: { ...tenantFields }
  delete: (id: string) => boolean
}
  • Create TenantService and add it to IoC container
  • create function
    • create function should call create tenant endpoint on auth server admin api
  • get function
  • update function
  • delete function
    • delete function should call delete tenant endpoint on auth server admin api
    • use soft deletion

Prerequisites

Metadata

Metadata

Assignees

Labels

pkg: backendChanges in the backend package.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions