how to pass custom state data through login?

Mark Jeftovic openid at markjr.net
Mon Aug 13 12:13:39 PDT 2007


Hi, I'm using Auth_OpenID-1.2.2 and I'm trying to figure out how a
consumer can attach some custom state data to the authentication process
so it can act on that data after the user authenticates.

Looking at the spec it seems you should be able to do this via the
openid.return_to URL? Would this be by adding more GET params to it?

" openid.return_to

     Note: The return_to URL MAY be used as a mechanism for the Relying
Party to attach context about the authentication request to the
authentication response. This document does not define a mechanism by
which the RP can ensure that query parameters are not modified by
outside parties; such a mechanism can be defined by the RP itself."

But I'm not sure how to implement this. In the examples I tried adding a
get param to the  $process_url in consumer.php, I also trying setting it
explicitly:

$store = new Auth_OpenID_FileStore($store_path);
$consumer = new Auth_OpenID_Consumer($store);
$consumer->return_to_args['mydata']="mydata";

But all I get back in the nonce.

What am I overlooking?

thx

-mark



More information about the Dev mailing list