简体   繁体   English

我将令牌服务器存储在哪里?

[英]Where do I store my tokens server side?

I made (myself) an authentication system for my ExtJS app. 我为自己的ExtJS应用程序制作了一个身份验证系统。

When I login my server generates a token which is stored by my client. 登录时,服务器生成一个令牌,该令牌由我的客户端存储。 When I have to send a request to my server I put my token in the request headers, but what is the common way to check the token server side? 当我必须向服务器发送请求时,将令牌放入请求标头中,但是检查令牌服务器端的常用方法是什么?

Do I have to store the token in my database, do a select query, etc.? 我是否必须将令牌存储在数据库中,执行选择查询等?

Does it in another way? 是否以其他方式? Querying my database 1 more time for each request doesn't seems a good idea for me (but maybe I'm wrong) 对于每个请求多查询我的数据库1次对我来说似乎不是一个好主意(但也许我错了)

这应该可以回答您的问题- 有状态头脑的无状态会话

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数据库还是会话? 存储令牌的位置 - database or sessions ? where to store tokens 如何控制对服务器端数据的访问? - How do I control access to my server-side data? 如何确定我的Ajax请求在客户端还是服务器端失败? - How do I determine if my ajax request is failing on the client side or server side? 我在哪里将单元测试文件存储在php项目中? - where do I store my unit test files in my php project? 在Laravel 5中,我在哪里存储XMLHttpRequest()调用的PHP脚本? - In Laravel 5, where do I store my php script that my XMLHttpRequest() calls? 如何将plist文件上传到服务器,我是否必须在服务器端执行特殊操作? - How do I upload a plist file to my server and do I have to do anything special on the server-side? Facebook访问令牌 - 服务器端身份验证 - Facebook Access Tokens - Server-Side Authentication OAuth2-我的访问令牌是服务器端的机密,是的,那么如何将其与AJAX一起使用? - OAuth2 - my access token is a server-side secret, yes, so how do I use it with AJAX? 搜索过滤器,我应该在客户端还是服务器端执行? - Search Filter, should I do it client side or server side? 了解我的代码,令牌来自哪里? - Understanding my code, Where are the tokens coming from?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM