Sha256: 1b0c97835b69ee0090ef8130e77adcffa5035454c3f62fb96a0c45f911927438
Contents?: true
Size: 629 Bytes
Versions: 9
Compression:
Stored size: 629 Bytes
Contents
require 'oauth2' module ShopappCompany extend ActiveSupport::Concern def app_info @app_info ||= JSON.parse client.request(:get, "/api/company/app_info.json?key=#{info['shoplift_key']}").body end def client @oauth ||= OAuth2::Client.new Rails.configuration.settings['authlift_app_id'], Rails.configuration.settings['authlift_app_secret'], site: Rails.configuration.settings['authlift_url'] @token ||= @oauth.client_credentials.get_token scope: [Rails.configuration.settings['authlift_default_scope'], 'public'].compact.join(' ') end end
Version data entries
9 entries across 9 versions & 1 rubygems