设计 token_authenticable 已弃用,替代方案是什么? [英] Devise token_authenticatable deprecated, what is the alternative?

查看:19
本文介绍了设计 token_authenticable 已弃用,替代方案是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前一直使用 token_authenticable 来保护我的 API,但是,我发现它已被弃用?我应该改用什么,为什么他们不赞成使用它?

I have been using token_authenticatable before to secure my API, however, I have found that it was deprecated? What should I use instead and why did they deprecate it?

推荐答案

来自他们的 博客 :

"我们无法消化 TokenAuthenticatable 提供的身份验证令牌,因为它们通常是令牌被多次使用的 API 的一部分.由于可身份验证令牌的使用在应用程序之间可能有很大差异,每个应用程序都需要不同的安全保证,我们已决定从 Devise 中删除 TokenAuthenticatable,允许用户选择最佳选项."

"we cannot digest the authentication token provided by TokenAuthenticatable, as they are often part of APIs where the token is used many times. Since the usage of the authenticatable token can vary considerably in between applications, each requiring different safety guarantees, we have decided to remove TokenAuthenticatable from Devise, allowing users to pick the best option."

现在由开发人员根据他们对身份验证令牌的使用情况选择最合适的.

It's now up to the developers to choose the best fit depending on their usage of the authentication token.

查看此要点.

这篇关于设计 token_authenticable 已弃用,替代方案是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆