Class OauthController
In: app/controllers/oauth_controller.rb
Parent: ApplicationController

Methods

Public Instance methods

request token just got validated by user, establish the auth token (and redirect to conversion/new)

[Source]

    # File app/controllers/oauth_controller.rb, line 24
24:   def smartfm_callback
25:  
26:     puts "storing auth token #{session[:username]}"
27:     SmartFm::Authtoken.establish_auth_token(session[:username], session[:request_token])
28:  
29:     redirect_to(conversions_url)
30:    end

no auth token found, request a request token and let the user validate it on iKnow! site

[Source]

    # File app/controllers/oauth_controller.rb, line 6
 6:   def smartfm_new_request
 7:  
 8:     @request_token = SmartFm::Authtoken.new_request_token
 9:  
10:     session[:username]      = params[:username]
11:     session[:request_token] = @request_token
12:     
13:     if @request_token
14:       redirect_to(@request_token.authorize_url)
15:     else
16:       render(:text => "Failed to get a Request Token") 
17:     end
18:  
19:   end

[Validate]