Devise token_authenticatable已弃用,有什么替代方法? [英] Devise token_authenticatable deprecated, what is the alternative?

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

问题描述

我以前一直在使用 token_authenticatable 来保护我的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.

将此要点

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

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