doutang3077 2013-05-16 20:10
浏览 54
已采纳

Objective-c&php / mysql:登录身份验证和请求

I'm developing an iphone app and I need to implement a 'safe' login system.

When the users writes his credentials, using a httprequest, phpmysql responds if authentification is correct or not.

But.. Do I have to send the credentials for every request after the login? For example: When I'm logged in, if I wanna get my profile info, should I send my credentials again?

I thought to implement a 'token' system, when an user logs in the server responds with a 'token' wich could be used for every request but... What if someone 'intercepts' this token? He could make petitions using this token like if he was the other user..

Hope I could explain what I'm trying to do (not using ssl)

Thanks!

  • 写回答

2条回答 默认 最新

  • dongyinting3179 2013-05-16 20:40
    关注

    You should encrypt the credentials before you transmit them using AES or a SHA512 hash. This goes for using the token as well if you go that route. Definitely use SSL.

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

报告相同问题?

悬赏问题

  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题