spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-0.4.2 vs spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-0.5.0.rc1

- old
+ new

@@ -1,6 +1,10 @@ Doorkeeper.configure do + # Change the ORM that doorkeeper will use + # Currently supported => :active_record, :mongoid + orm DOORKEEPER_ORM + # This block will be called to check whether the # resource owner is authenticated or not resource_owner_authenticator do |routes| # Put your resource owner authentication logic here. # If you want to use named routes from your app you need @@ -19,10 +23,13 @@ # # to call them on routes object eg. # # routes.new_admin_session_path # Admin.find_by_id(session[:admin_id]) || redirect_to(routes.new_admin_session_url) # end + # Authorization Code expiration time (default 10 minutes). + # access_token_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 # Issue access tokens with refresh token (disabled by default) @@ -36,6 +43,12 @@ # Change the way client credentials are retrieved from the request object. # By default it retrieves first from `HTTP_AUTHORIZATION` header and # fallsback to `:client_id` and `:client_secret` from `params` object # Check out the wiki for mor information on customization # client_credentials :from_basic, :from_params + + # Change the way access token is authenticated from the request object. + # By default it retrieves first from `HTTP_AUTHORIZATION` header and + # fallsback to `:access_token` or `:bearer_token` from `params` object + # Check out the wiki for mor information on customization + # access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param end