Play framework security with facebook application inside iframe using safari -
i have facebook aplication , using play framework 1.2.4 server, manage load application in safari , in internet explorer adding header before method
response.setheader("p3p", "cp=\"idc dsp cor adm devi taii psa psd ivai ivdi coni our ind cnt\"");
and javascript code , in main loaded page.
#{if session.get("user-id") == null} <div id="safari_cookie_hack" style="position: absolute; top: -10000px"></div> <script> if (document.cookie.indexof('user-id') < 0) { window.settimeout(function() { var name = 'safari_cookie_hack', div = document.getelementbyid(name), iframe = document.createelement('iframe'), form = document.createelement('form'); iframe.name = name; iframe.src = 'javascript:false'; div.appendchild(iframe); form.action = location.tostring(); form.method = 'post'; form.target = name; div.appendchild(form); form.submit(); }, 10); } </script> #{/if}
recently wanted add play security module .
all works fine safari (version 5.1.7 installed on pc).
the first call
secure.checkaccess
works fine . finnaly redirected application controller using method
secure.redirecttooriginalurl
in point when see session has "username" parameter.
but when trying access other pages in application . got no sessoin more , redirected login.html ... of since secure module
can u solve this/
Comments
Post a Comment