Have you confirmed that a cookie called "cosign-<servicename>" ends up in
your curl cookie jar?

After writing to the cookie file, I've opened the file and yes,
cosign-<servicename>  does show up.


On Tue, Aug 16, 2011 at 9:13 AM, Andrew Mortensen <[email protected]>wrote:

>
> On Aug 15, 2011, at 5:12 PM, Brendan Dailey wrote:
>
> > Hey all-
> > So let's say I'm on a page that is authenticated via CoSign on a server.
> I then run a script that tries to grab the same CoSign authenticated page's
> contents. When I try this, the response returns http code 302 with a redir
> link. If I manually follow the link, the page loads fine. If I set the curl
> option "FOLLOWTRANSFERS", I end up at a CoSign authentication page.
> >
> > I assumed attaching all currently set cookies would fix the problem since
> CoSign uses session cookies, but to no avail. Below is a sample of my curl
> code. I know this isn't a PHP forum, but it appears to only be affecting
> CoSign sites.
>
> Have you confirmed that a cookie called "cosign-<servicename>" ends up in
> your curl cookie jar?
>
> andrew
>
>
> >
> > $fname = '/home/temp/cookies.txt';
> > if( $stream = fopen($fname, 'w') ) {
> >       fwrite($stream, $_SERVER['HTTP_COOKIE']);
> > }
> >
> > $client = curl_init();
> > curl_setopt($client, CURLOPT_RETURNTRANSFER, true);
> > curl_setopt($client, CURLOPT_FOLLOWLOCATION, true);
> > curl_setopt($ch, CURLOPT_COOKIEJAR, '/home/temp/cookies.txt');
> > curl_setopt($ch, CURLOPT_COOKIEFILE, '/home/temp/cookies.txt');
> > curl_setopt($client, CURLOPT_URL, $url);
> >
> > $response = curl_exec($client);
> >
> > curl_close($client);
> >
> > Thanks!
> >
> > --
> > Brendan Dailey
> > ITS/SITES Print Team - Student Developer
> > President of the Catholic Student Association
> > University of Michigan
> > [email protected]
> >
> > !DSPAM:4e4997b9188882560778728!
> ------------------------------------------------------------------------------
> > uberSVN's rich system and user administration capabilities and model
> > configuration take the hassle out of deploying and managing Subversion
> and
> > the tools developers use with it. Learn more about uberSVN and get a free
> > download at:  http://p.sf.net/sfu/wandisco-dev2dev
> >
> >
> > !DSPAM:4e4997b9188882560778728!
> > _______________________________________________
> > Cosign-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cosign-discuss
> >
> >
> > !DSPAM:4e4997b9188882560778728!
>
>


-- 
Brendan Dailey
ITS/SITES Print Team - Student Developer
President of the Catholic Student Association
University of Michigan
[email protected]
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Cosign-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cosign-discuss

Reply via email to