authentication - sfGuardPlugin session: how to reuse it with wget -- or map SID to sfGuardUser -
recently asked add xml api 1 of symfony modules in project. did it, , works well. authentication, use sfguardplugin
. symfony version 1.3.11. using propel, not doctrine.
the recent request me this:
- we embed flash game website.
- the flash requests xml api.
- the guy coding flash application says doesn't share cookies browser.
- we want flash able reuse session of logged in user (we won't allow shown if no user logged in).
i did try would-be solution: (taken other articles , various google search results)
- i told symfony session resides in
symfony
cookie. - i told if copy value in client (in case,
wget
) ,session_id("stolen_session_id")
able duplicate session, have same user logged in, etc. - this turned out wrong. cookie symfony had "blabla" value. did this:
wget --post-data='session_id=blabla' x.x.x.x:nn/api/bla.xml -o-
. server php code parses post parameter , feedssession_id
function. reported in logssession_id('blabla')
returning1
. however, calling$this->getuser()->getguarduser()
returnsnull
.
i need way map passed session_id
valid sfguarduser
. or find alternative way of reusing session exists.
suppose have full access cookies. want know 1 of them (or of them?) duplicate in order achieve this.
btw, seeing in chrome dev tools symfony
cookie of session type. it's no wonder @ why method doesn't work, little lost how do in symfony, while using sfguardplugin
.
i realize not 1 of informed questions, ditto, need help.
thanks time.
(dimitar p.)
oops, forgot mention cookies see on domain:
- symfony
- sfremember
- __utma
- __utmb
- __utmc
- __utmz
i guessing last 4 google analytics, though.
i didn't want this, unable find other alternatives:
$ wget --header='cookie: symfony=blabla' x.x.x.x:nn/api/bla.xml -o-
i wanted xml api rest, evidently, symfony doesn't allow authenticated requests other way using cookies (and enable session id included in url not option at all).
still, if shows rest alternative, upvote his/her answer.
Comments
Post a Comment