Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OrganizationService

Manage organizations from the API.

Hierarchy

  • Service<OrganizationsManagingOrganizationsApi>
    • OrganizationService

Index

Constructors

constructor

Properties

Protected environment

environment: Environment

Protected keystoreAPIFactory

keystoreAPIFactory: KeystoreAPIFactory

Protected logger

logger: IFullLogger

Protected vaultAPIFactory

vaultAPIFactory: VaultAPIFactory

Methods

create

  • create(credentials: IVaultToken, name: string, info?: Partial<{ description: string; email: string; url: string }>): Promise<{ organization: Organization; privateKey: string; publicKey: string }>
  • Request creation of an Organization. The Organization has a key pair that is used to encrypt session tokens, so only members with the private key can login on behalf of the Organization. This is privateKey in the result; it must be stored securely, if lost you cannot log in to the Organization.

    Parameters

    • credentials: IVaultToken
    • name: string
    • info: Partial<{ description: string; email: string; url: string }> = {}

    Returns Promise<{ organization: Organization; privateKey: string; publicKey: string }>

getAPI

  • getAPI(token: IVaultToken): OrganizationsManagingOrganizationsApi

getOrganizationToken

  • getOrganizationToken(credentials: IVaultToken, organizationId: string, privateKey: string): Promise<IVaultToken>

listAll

  • listAll(credentials: IVaultToken, mode?: OrganizationsGetModeEnum): Promise<{ organizations: Organization[]; services: Service[] }>
  • Parameters

    • credentials: IVaultToken
    • Optional mode: OrganizationsGetModeEnum

      If unspecified returns all validated organizations; requested by user, or user member orgs can be given too.

    Returns Promise<{ organizations: Organization[]; services: Service[] }>

setLogger

  • setLogger(logger: Logger): void

Generated using TypeDoc