Sha256: a07c32e5b283bb6c4804c7e9a1ac084f9d7a6d55e7cf85ab5862a39c9c15bd44
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
Doorkeeper.configure do # This block will be called to check whether the # resource owner is authenticated or not resource_owner_authenticator do |routes| raise "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}" # Put your resource owner authentication logic here. # If you want to use named routes from your app you need # to call them on routes object eg. # routes.new_user_session_path # e.g. User.find_by_id(session[:user_id]) || redirect_to(routes.new_user_session_path) end # If you want to restrict the access to the web interface for # adding oauth authorized applications you need to declare the # block below # admin_authenticator do |routes| # # Put your admin authentication logic here. # # If you want to use named routes from your app you need # # 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_path) # end # Access token expiration time (default 2 hours) # access_token_expires_in 2.hours # Issue access tokens with refresh token (disabled by default) # use_refresh_token # Define access token scopes for your provider # For more information go to https://github.com/applicake/doorkeeper/wiki/Using-Scopes # authorization_scopes do # scope :public, :default => true, :description => "The public one" # scope :write, :description => "Updating information" # end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
doorkeeper-0.3.1 | lib/generators/doorkeeper/templates/initializer.rb |