dtkyayvldeaqhl7151 2011-02-13 18:56
浏览 60
已采纳

在Dojo / PHP应用程序中进行身份验证

I am at the moment trying to develop a web app with Dojo ( I am successfully developing it so far!)

I am using php at the back end (No I am not using Zend framework - I don't like he fact that eats memory) The gui and PHP are communicating to each other using JSON.
I was wondering (as I am not an expert at all) is there any way that whenever the client successfully authenticate (not using HTTP authentication BUT a custom log in screen) that I can create a session at the end of PHP? in some words, I want that the user once will authenticate successfully (therefore can access the main Panel or his/her profile) can go back to the website (the web app) without authenticate again UNLESS the user will LOG OUT. I am aware of cookies but the documentation is not clear on how to do that AND I am developing the back end with PHP, I am aware of sessions in PHP but I don't fully understand how exactly the server can save the user's session. Thank you all for your time :)

  • 写回答

2条回答 默认 最新

  • douque9815 2011-02-13 19:11
    关注

    Well, as you have outlined you have two options: session and cookies.

    Unless you want another different behaviour for some application-specific reasons, you can use the "remember me" method to differentiate between them.

    So this way you create a new session to indicate that the user is logged in unless he ticks the checkbox, in which case you should go for cookies.

    You can take a look at this screencast and see how they work: http://net.tutsplus.com/articles/news/how-to-build-a-login-system-for-a-simple-website/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度