Sha256: d551ce565af04f16d880a44da664993a71772678c28858c247568961e36cda88
Contents?: true
Size: 1023 Bytes
Versions: 2
Compression:
Stored size: 1023 Bytes
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_seesion_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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
doorkeeper-0.1.1 | lib/generators/doorkeeper/templates/initializer.rb |
doorkeeper-0.1.0 | lib/generators/doorkeeper/templates/initializer.rb |