无法使用devise_cas_authenticatable进行身份验证

时间:2012-05-03 07:04:24

标签: ruby-on-rails ruby devise

我正按照https://github.com/nbudin/devise_cas_authenticatable的指示行事。但是,使用此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

谢谢!

1 个答案:

答案 0 :(得分:1)

您是否在用户模型中替换了:database_authenticatable

devise :cas_authenticatable, ...

请参阅github上的devise_cas_authenticatable自述文件。