private function checkCredentials(array $args = []): bool
    {
        if (empty($args['credentials'])) {
            throw new DorcasException('You did not provide the Dorcas client credentials in the configuration.', $args);
        }
        $id = data_get($args, 'credentials.id', null);
        $secret = data_get($args, 'credentials.secret', null);
        if (empty($id)) {
            throw new DorcasException('The client "id" key is absent in the credentials configuration.', $args);
        }
        if (empty($secret)) {
            throw new DorcasException('The client "secret" key is absent in the credentials configuration.', $args);
        }
        return true;
    }