Class: PpLogin::PpAccountController
Instance Method Summary
collapse
Methods included from Helpers
#for_action, included, #paypal_login, #token
Instance Method Details
#get_token ⇒ Object
4
5
6
7
|
# File 'app/controllers/pp_login/pp_account_controller.rb', line 4
def get_token
token = get_access_token(token_params[:code])
save_info(token)
end
|
#logout ⇒ Object
19
20
21
22
|
# File 'app/controllers/pp_login/pp_account_controller.rb', line 19
def logout
token = refresh_token(token_params[:refresh_token])
redirect_to token.logout_url
end
|
#refresh_token ⇒ Object
9
10
11
12
|
# File 'app/controllers/pp_login/pp_account_controller.rb', line 9
def refresh_token
token = refresh_token(token_params[:refresh_token])
save_info(token)
end
|
#user_info ⇒ Object
14
15
16
17
|
# File 'app/controllers/pp_login/pp_account_controller.rb', line 14
def user_info
user_info = get_user_info(token_params[:access_token])
save_info(user_info)
end
|