I'm following the instruction at https://github.com/nbudin/devise_cas_authenticatable. However, using this and before_filter :authenticate_user!
still makes the app trying to authenticate using the database authentication strategy for devise. Below is the devise config file:
我正在按照https://github.com/nbudin/devise_cas_authenticatable上的说明进行操作。但是,使用this和before_filter:authenticate_user!仍然使应用程序尝试使用设备的数据库身份验证策略进行身份验证。下面是设计配置文件:
Devise.setup do |config|
require 'devise/orm/active_record'
config.cas_base_url = 'https://cas.uwaterloo.ca/cas'
# If true, uses the password salt as remember token. This should be turned
# to false if you are not using database authenticatable.
config.use_salt_as_remember_token = true
# ==> Configuration for :token_authenticatable
# Defines name of the authentication token params key
config.token_authentication_key = :auth_token
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete
end
Thanks!
谢谢!
1 个解决方案
#1
1
Did you replace :database_authenticatable
in your user model?
您是否在用户模型中替换了:database_authenticatable?
devise :cas_authenticatable, ...
See the readme for devise_cas_authenticatable
on github.
请参阅github上的devise_cas_authenticatable自述文件。
#1
1
Did you replace :database_authenticatable
in your user model?
您是否在用户模型中替换了:database_authenticatable?
devise :cas_authenticatable, ...
See the readme for devise_cas_authenticatable
on github.
请参阅github上的devise_cas_authenticatable自述文件。