diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-12 19:46:06 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-12 19:46:06 +0100 |
commit | 1aa477ac2f0e9195497899691bb5cc16a7034c01 (patch) | |
tree | c331188d6955cbdd12e78bc6ccdb2329b5dddf67 /config/initializers | |
parent | aab9f57e369c492bad03bcf15411394897314b4d (diff) |
Customized more doorkeeper views, only logged in users can create oauth apps
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/doorkeeper.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 22a379b66..69a730cac 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -14,18 +14,16 @@ Doorkeeper.configure do end # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below. - # admin_authenticator do - # # Put your admin authentication logic here. - # # Example implementation: - # Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url) - # end + admin_authenticator do + current_user || redirect_to(new_user_session_url) + end # Authorization Code expiration time (default 10 minutes). # authorization_code_expires_in 10.minutes # Access token expiration time (default 2 hours). # If you want to disable expiration, set this to nil. - # access_token_expires_in 2.hours + # access_token_expires_in nil # Assign a custom TTL for implicit grants. # custom_access_token_expires_in do |oauth_client| |