2012-05-03 10 views
1

私はhttps://github.com/nbudin/devise_cas_authenticatableの指示に従っています。ただし、これとbefore_filter :authenticate_user!を使用すると、アプリはdeviseのデータベース認証戦略を使用して認証しようとします。以下はデバイス設定ファイルです。devise_cas_authenticatableを使用して認証できません

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

ユーザモデルで:database_authenticatableを交換しましたか?

devise :cas_authenticatable, ... 

githubのdevise_cas_authenticatableのReadmeを参照してください。

関連する問題