Options
All
  • Public
  • Public/Protected
  • All
Menu

Supports IDP registration and pod creation based on input parameters.

The above behaviour is combined in the two class functions. validateInput will make sure all incoming data is correct and makes sense. register will call all the correct handlers based on the requirements of the validated parameters.

Hierarchy

  • RegistrationManager

Index

Constructors

constructor

Properties

Private Readonly accountStore

accountStore: AccountStore

Private Readonly baseUrl

baseUrl: string

Private Readonly identifierGenerator

identifierGenerator: IdentifierGenerator

Protected Readonly logger

logger: Logger = ...

Private Readonly ownershipValidator

ownershipValidator: OwnershipValidator

Private Readonly podManager

podManager: PodManager

Private Readonly webIdSuffix

webIdSuffix: string

Methods

register

  • Handles the 3 potential steps of the registration process:

    1. Generating a new WebID.
    2. Registering a WebID with the IDP.
    3. Creating a new pod for a given WebID.

    All of these steps are optional and will be determined based on the input parameters.

    This includes the following steps:

    • Ownership will be verified when the WebID is provided.
    • When registering and creating a pod, the base URL will be used as oidcIssuer value.

    Parameters

    Returns Promise<RegistrationResponse>

Private trimString

  • trimString(input: unknown): undefined | string

validateInput

  • Makes sure the input conforms to the following requirements when relevant:

    • At least one option needs to be chosen.
    • In case a new WebID needs to be created, the other 2 steps will be set to true.
    • Valid email/WebID/password/podName when required.
    • Only create a root pod when allowed.

    Parameters

    • input: Dict<unknown>

      Input parameters for the registration procedure.

    • allowRoot: boolean = false

      If creating a pod in the root container should be allowed.

    Returns RegistrationParams

    A cleaned up version of the input parameters. Only (trimmed) parameters that are relevant to the registration procedure will be retained.