From: Victor Stone <fourstones.net@gm...> - 2006-11-27 20:06:51
On 11/23/06, Nilesh Ashra <nilesh@...> wrote:
> I wish to embed a flash application in the site, which needs to have a
> parameter embedded into the <embed> markup. The parameter is an
> authorization token which the flash player will use to send back to a web
> API i'm writing as a module for cchost. If the user isn't logged in, the
> token isn't embedded and thus the user won't have access to certain
> functionality. If the user is logged in, a hash is generated server-side
> using their hashed password as salt. This hash is the token the flash app
> will use to authenticate itself to the web service.
> All I need to be able to do is, check whether a user is logged in, and if
> they are, grab their password and username and generate the token (which
> will then obviously passed to a template). I'd like to do this without using
> cookies. I've noticed CC_GLOBALS kicking around in places - could I use this
> to get logged-in status and username/user_id?
you can do this 100% in the template for the page.
<param tal:condition="not: logged_in_as">anonymous</param>
The key being the "tal:condition" attribute
Get latest updates about Open Source Projects, Conferences and News.