[38196] in Kerberos
RE: Different realms
daemon@ATHENA.MIT.EDU (Imanuel Greenfeld)
Sun Jan 28 16:58:48 2018
From: "Imanuel Greenfeld" <imanuel.greenfeld1@ntlworld.com>
To: "'Robbie Harwood'" <rharwood@redhat.com>, <kerberos@mit.edu>
In-Reply-To: <jlgr2q9n4wi.fsf@redhat.com>
Date: Sun, 28 Jan 2018 20:54:16 -0000
Message-ID: <000201d3987a$293a3930$7baeab90$@ntlworld.com>
MIME-Version: 1.0
Content-Language: en-gb
Cc: "'Simo Sorce'" <simo@redhat.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu
Thank you Robbie.
Appreciated.
The problem is that we're 6 months into the project and we'll have to start
again using libcurl instead of gSoap.
So I'm re-sending you the existing code. Any ideas how this needs to change
so that I can authenticate ?
struct SOAP_ENV__Header
{
struct ns3__Header *ns3__MyHeader;
};
struct ns3__Header
{
char *Username;
char *Password;
};
soap * mysoap = soap_new1(SOAP_C_UTFSTRING);
soap_init(&mysoap);
mysoap.header = (SOAP_ENV__Header *)soap_malloc(&mysoap,
sizeof(SOAP_ENV__Header));
mysoap.header->ns3__MyHeader = (ns3__Header*)malloc(sizeof(ns3__Header));
/****** I know that hard coding username and password is contrary to
Kerberos but I'm just trying to see if I can pass the authentication.
******/
mysoap.header->ns3__MyHeader->Username = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader-> Username, "<username>");
mysoap.header->ns3__MyHeader-> Password = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader-> Password, "<password>");
const char *endpointURL = "http://...";
value request(mysoap), response(mysoap);
... // now populate the request data to send
request[0] = ...;
request[1] = ...;
if (json_call(mysoap, endpointURL, request, response))
{
... // use response value
}
Thank you.
Imanuel.
-----Original Message-----
From: Robbie Harwood [mailto:rharwood@redhat.com]
Sent: 28 January 2018 19:46
To: Imanuel Greenfeld <imanuel.greenfeld1@ntlworld.com>; kerberos@mit.edu
Cc: 'Simo Sorce' <simo@redhat.com>
Subject: RE: Different realms
"Imanuel Greenfeld" <imanuel.greenfeld1@ntlworld.com> writes:
> You are right using a script calling curl I managed to send the
> request and all ok, but it's horrible idea to call curl from C++ and
> how will I do it ? system call ?
Curl has a library (libcurl) with bindings you can use:
https://curl.haxx.se/libcurl/
Thanks,
--Robbie
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos