[Freeipa-users] First tests against the REST/JSON API

Oliver Dörr oliver at doerr-privat.de
Mon Nov 9 17:58:56 UTC 2015


Hi,

I'm completly new to this list and the product behind it. I'm trying to 
use perl to get a list from my IPA installation of all users that are on 
the server.



#!/usr/bin/perl

use strict;
use REST::Client;
use JSON;
use Data::Dumper;
use MIME::Base64;

my $username="admin";
my $password="secret";
my $headers= {
     'Accept' => 'application/json',
     'Content-Type' => 'application/x-www-form-urlencoded',
     'Authorization' => 'Basic',
     'user' => encode_base64($username),
     'password' => encode_base64($password)
     #encode_base64($username.":".$password)
};

my $client=REST::Client->new();
$client->setHost("https://ipa.kreditwerk.de");
$client->POST("/ipa/session/login_password", $headers);
print Dumper $client->responseContent();

Sadly I get back
$VAR1 = '500 Not a SCALAR reference
';


I can't find any hinside the error log of the apache, even with debug 
enabled. I can't find  any thing in the internet that helps me. (Perhaps 
I do not know where to look for).

So any idea where I should look at it to troubleshoot this problem?

Thanks
oliver




More information about the Freeipa-users mailing list