security - 什么是基于 token 的身份验证?

标签 security authentication token http-token-authentication

我想了解基于 token 的身份验证的含义。我在互联网上搜索但找不到任何可以理解的内容。

最佳答案

我认为解释得很好here ——仅引用长文的关键句子:

The general concept behind a token-based authentication system is simple. Allow users to enter their username and password in order to obtain a token which allows them to fetch a specific resource - without using their username and password. Once their token has been obtained, the user can offer the token - which offers access to a specific resource for a time period - to the remote site.

换句话说:添加一层间接身份验证 - 用户不必使用每个 protected 资源的用户名和密码进行身份验证,而是以这种方式进行一次身份验证(在有限持续时间的 session 内),获得一个有时间限制的资源作为返回,并使用该 token 在 session 期间进行进一步的身份验证。

优点有很多 - 例如,用户一旦获得 token ,就可以将其传递到他们愿意在有限的时间和有限的资源中信任的其他自动化系统,但会不愿意愿意信任他们的用户名和密码(即,永远信任他们被允许访问的每项资源,或者至少在他们更改密码之前)。

如果仍有不清楚的地方,请编辑您的问题以澄清您不 100% 清楚的内容,我相信我们可以为您提供进一步帮助。

关于security - 什么是基于 token 的身份验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1592534/

相关文章:

linux - Apache-CGI-Bash 应用程序中的安全性或其他陷阱?

c# - 第一次在 ASP.NET 中使用安全性

javascript - HTML 单页应用,用浏览器填写用户名和密码

C 在 MACROS 中粘贴标记以处理 C 中的位字段

Angular 2/4 在哪里存储 token

ruby-on-rails - devise_token_auth - 是否可以验证用户!不会使过滤器链失败?

php - mysqli 准备好的语句不转义哪些字符?

apache - GWT-RPC、Apache、Tomcat 服务器数据大小检查

dropbox - 如何在不离开网页的情况下对 Dropbox 应用进行身份验证并使用 API?

azure - Azure Functions 上的身份验证如何工作