generators/oauth_provider/templates/controller.rb in oauth-plugin-0.3.14 vs generators/oauth_provider/templates/controller.rb in oauth-plugin-0.4.0.pre1

- old
+ new

@@ -1,11 +1,23 @@ require 'oauth/controllers/provider_controller' class OauthController < ApplicationController include OAuth::Controllers::ProviderController + protected # Override this to match your authorization page form # It currently expects a checkbox called authorize # def user_authorizes_token? # params[:authorize] == '1' + # end + + # should authenticate and return a user if valid password. + # This example should work with most Authlogic or Devise. Uncomment it + # def authenticate_user(username,password) + # user = User.find_by_email params[:username] + # if user && user.valid_password?(params[:password]) + # user + # else + # nil + # end # end end