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级)。
我在做什么错?