1
我在rails應用程序上使用守護進行OAuth功能。另外我正在使用設計進行用戶安全管理。門衛錯誤幫助需要
這是我目前的doorkeeper.rb文件:
Doorkeeper.configure do
orm :active_record
resource_owner_authenticator do
user_signed_in? || redirect_to(new_user_session_url)
end
admin_authenticator do
user_signed_in? || redirect_to(new_user_session_url)
end
enable_application_owner :confirmation => true
# authorization_code_expires_in 10.minutes
# access_token_expires_in 2.hours
# use_refresh_token
# default_scopes :public
# optional_scopes :write, :update
# client_credentials :from_basic, :from_params
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
# test_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
# skip_authorization do |resource_owner, client|
# client.superapp? or resource_owner.admin?
# end
# realm "Doorkeeper"
end
當我訪問/ OAuth的/應用程序,我得到一個錯誤網頁,其中顯示「未初始化的常量管理」和「配置/初始化/ doorkeeper.rb :18:在''塊中(2級)。
我在做什麼錯?