[英]What algorithm does the Devise gem use to generate the authentication token?
I have an app that uses the Devise authentication token mechanism to do client token authentication. 我有一个使用Devise身份验证令牌机制进行客户端令牌身份验证的应用。 I was wondering what algorithm the gem uses to generate the token itself?
我想知道gem用于生成令牌本身的算法是什么? Is it BCrypt?
是BCrypt吗? MD5 etc etc...
MD5等...
The code is in devise.rb
: 代码在
devise.rb
:
# Generate a friendly string randomically to be used as token.
def self.friendly_token
SecureRandom.base64(15).tr('+/=lIO0', 'pqrsxyz')
end
http://rdoc.info/github/plataformatec/devise/Devise.friendly_token http://rdoc.info/github/plataformatec/devise/Devise.friendly_token
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.