Sha256: 9f9609eba64224c59bb00772e39859cb932282cccf14c76cbf53911ce39592bc
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 Bytes
Contents
require 'oauth2' module ShopappCompany extend ActiveSupport::Concern def app_info @app_info ||= JSON.parse client.request(:get, "http://localhost:3031/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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shopapp-0.2.74 | app/models/concerns/shopapp_company.rb |