我尝试使用 Phil Sturgeon (Codeigniter RestServer) 的出色工作为我服务。
我计划使用这个工作流程:
client --> client connect to my service with credentials
server <-- check credentials in db, generate api-key for this user, and send it
client --> send request to get personal infos with new api-key in header
server <-- retrieve infos for this user from api-key, send infos
client --> another request with new api-key in header
server <-- check if api-key lifetime < 15m, if ok execute request and update lifetime else return timeout error
...
任何人都可以使用 RestServer X-API-KEY 帮助我做到这一点,或者我可以自己进行 API-KEY 管理?谢谢。