Cumulocity Web SDK - v1023.14.16
    Preparing search index...

    Class TenantLoginOptionsService

    This service allows to get tenant login options.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Removes tenant's login option.

      Parameters

      • entityOrId: string | IIdentified

        Tenant's login option's id or tenant's login option object.

      Returns Promise<IResult<null>>

      Returns promise object that is resolved with the IResult of null.

      Example


      const tenantLoginOptionId: string = 'uniqueTenantLoginOptionId';

      (async () => {
      const {data, res} = await tenantLoginOptionsService.delete(tenantLoginOptionId);
      })();
    • Update tenant's login option data if id exists in object, otherwise create new entity.

      Parameters

      Returns Promise<IResult<ITenantLoginOption>>

      Returns promise object that is resolved with the saved tenant's login option object.

      Example


      const tenantLoginOption: ITenantLoginOption = {
      grantType: "PASSWORD",
      id: "2eff9a0b-e376-4ce8-a0f1-0a07cef8a8a1",
      providerName: "Cumulocity",
      type: "BASIC",
      userManagementSource: "INTERNAL",
      visibleOnLoginPage: true
      };

      (async () => {
      const {data, res} = await tenantLoginOptionsService.save(tenantLoginOption);
      })();
    • Updates tenant's login option data.

      Parameters

      Returns Promise<IResult<ITenantLoginOption>>

      Returns promise object that is resolved with the saved tenant's login option object.

      Example


      const tenantLoginOption: ITenantLoginOption = {
      grantType: "PASSWORD",
      id: "2eff9a0b-e376-4ce8-a0f1-0a07cef8a8a1",
      providerName: "Cumulocity",
      type: "BASIC",
      userManagementSource: "INTERNAL",
      visibleOnLoginPage: true
      };

      (async () => {
      const {data, res} = await tenantLoginOptionsService.update(tenantLoginOption);
      })();