Class: ShopifyApp::OmniAuthConfiguration
- Inherits:
-
Object
- Object
- ShopifyApp::OmniAuthConfiguration
- Defined in:
- lib/ruby_shopify_app/omniauth/omniauth_configuration.rb
Instance Attribute Summary collapse
-
#client_options_site ⇒ Object
writeonly
Sets the attribute client_options_site.
-
#per_user_permissions ⇒ Object
writeonly
Sets the attribute per_user_permissions.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#scopes ⇒ Object
writeonly
Sets the attribute scopes.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
Instance Method Summary collapse
- #build_options ⇒ Object
-
#initialize(strategy, request) ⇒ OmniAuthConfiguration
constructor
A new instance of OmniAuthConfiguration.
Constructor Details
#initialize(strategy, request) ⇒ OmniAuthConfiguration
Returns a new instance of OmniAuthConfiguration.
8 9 10 11 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 8 def initialize(strategy, request) @strategy = strategy @request = request end |
Instance Attribute Details
#client_options_site=(value) ⇒ Object
Sets the attribute client_options_site
6 7 8 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 6 def (value) @client_options_site = value end |
#per_user_permissions=(value) ⇒ Object (writeonly)
Sets the attribute per_user_permissions
6 7 8 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 6 def (value) @per_user_permissions = value end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
5 6 7 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 5 def request @request end |
#scopes=(value) ⇒ Object
Sets the attribute scopes
6 7 8 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 6 def scopes=(value) @scopes = value end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
5 6 7 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 5 def strategy @strategy end |
Instance Method Details
#build_options ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ruby_shopify_app/omniauth/omniauth_configuration.rb', line 13 def strategy.[:client_options][:site] = strategy.[:scope] = scopes strategy.[:old_client_secret] = ShopifyApp.configuration.old_secret strategy.[:per_user_permissions] = request_online_tokens? end |