public function findAllFor($userId) { Assert::string($userId, 'User ID "%s" expected to be string, type %s given.'); Assert::notEmpty($userId, 'User ID "%s" is empty, but non empty value was expected.'); $consentListJson = $this->apiClient->read('consent/%s', [$userId]); return ConsentListFactory::createListFromMetadata($consentListJson); }
/** * @param EntityId $entityId * @return ContactPersonList */ public function findAllForIdp(EntityId $entityId) { $identityProviderJson = $this->apiClient->read('metadata/idp?entity-id=%s', [$entityId->getEntityId()]); return ContactPersonListFactory::createListFromMetadata($identityProviderJson); }