Module: PpLogin
- Defined in:
- lib/pp_login.rb,
lib/pp_login/engine.rb,
lib/pp_login/version.rb,
lib/pp_login/main/modules/setup.rb,
lib/pp_login/main/modules/helpers.rb,
app/helpers/pp_login/application_helper.rb,
lib/pp_login/main/modules/account_actions.rb,
app/controllers/pp_login/pp_account_controller.rb,
app/controllers/pp_login/application_controller.rb
Defined Under Namespace
Modules: ApplicationHelper, Helpers Classes: ApplicationController, Engine, PpAccountController
Constant Summary collapse
- VERSION =
"0.0.3"
- Desc =
"This gem will Add an engine to handle loging in with paypal, getting user info and logging out again. "
Class Attribute Summary collapse
-
.id ⇒ Object
Returns the value of attribute id.
-
.loginURL ⇒ Object
Returns the value of attribute loginURL.
-
.mode ⇒ Object
Returns the value of attribute mode.
-
.redirect_url ⇒ Object
Returns the value of attribute redirect_url.
-
.scope ⇒ Object
Returns the value of attribute scope.
-
.secret ⇒ Object
Returns the value of attribute secret.
-
.token_model ⇒ Object
Returns the value of attribute token_model.
-
.token_store ⇒ Object
Returns the value of attribute token_store.
-
.user_model ⇒ Object
Returns the value of attribute user_model.
-
.user_store ⇒ Object
Returns the value of attribute user_store.
-
.website_url ⇒ Object
Returns the value of attribute website_url.
Class Method Summary collapse
- .get_access_token(code) ⇒ Object
- .get_user_info(access_token) ⇒ Object
- .refresh_token(refresh_token) ⇒ Object
-
.setup {|_self| ... } ⇒ Object
setup function for initializer file.
Class Attribute Details
.id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def id @id end |
.loginURL ⇒ Object
Returns the value of attribute loginURL.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def loginURL @loginURL end |
.mode ⇒ Object
Returns the value of attribute mode.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def mode @mode end |
.redirect_url ⇒ Object
Returns the value of attribute redirect_url.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def redirect_url @redirect_url end |
.scope ⇒ Object
Returns the value of attribute scope.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def scope @scope end |
.secret ⇒ Object
Returns the value of attribute secret.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def secret @secret end |
.token_model ⇒ Object
Returns the value of attribute token_model.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def token_model @token_model end |
.token_store ⇒ Object
Returns the value of attribute token_store.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def token_store @token_store end |
.user_model ⇒ Object
Returns the value of attribute user_model.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def user_model @user_model end |
.user_store ⇒ Object
Returns the value of attribute user_store.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def user_store @user_store end |
.website_url ⇒ Object
Returns the value of attribute website_url.
3 4 5 |
# File 'lib/pp_login/main/modules/setup.rb', line 3 def website_url @website_url end |
Class Method Details
.get_access_token(code) ⇒ Object
3 4 5 |
# File 'lib/pp_login/main/modules/account_actions.rb', line 3 def self.get_access_token(code) return Engine.instance_exec(code){|c| return self::Tokeninfo.create(c) } end |
.get_user_info(access_token) ⇒ Object
11 12 13 |
# File 'lib/pp_login/main/modules/account_actions.rb', line 11 def self.get_user_info(access_token) return Engine.instance_exec(get_access_token){|at| self::Userinfo.get(at) } end |
.refresh_token(refresh_token) ⇒ Object
7 8 9 |
# File 'lib/pp_login/main/modules/account_actions.rb', line 7 def self.refresh_token(refresh_token) return Engine.instance_exec(refresh_token){|rt| self::Tokeninfo.refresh(rt) } end |
.setup {|_self| ... } ⇒ Object
setup function for initializer file
6 7 8 9 10 |
# File 'lib/pp_login/main/modules/setup.rb', line 6 def self.setup(&block) #setup function for initializer file yield self self.redirect_url = self.website_url if !self.redirect_url self.token_store = :session if !self.token_store end |