code: public function login(User $user): string
      {
          $options = [
              'headers' => [
                  'Accept' => 'application/json',
                  'Content-Type' => 'application/json'
              ],
              'json' => [
                  'data' => [
                      'email' => $user->getEmail(),
                      'password' => $user->getPassword()
                  ]
              ]
          ];
          $token = $this->execute('POST', static::RESOURCE_LOGIN, $options);
  
          return $token;
      }
docs: Login
  
  @param \Ds\Component\Formio\Model\User $user
  @return string