module LHS::OAuth

Private Instance Methods

lhs_check_auto_oauth_enabled!() click to toggle source
# File lib/lhs/concerns/o_auth.rb, line 20
def lhs_check_auto_oauth_enabled!
  return if LHS.config.auto_oauth.present? && LHS.config.auto_oauth.is_a?(Proc)
  raise 'You have to enable LHS.config.auto_oauth by passing a proc returning an access token!'
end
lhs_store_oauth_access_token() click to toggle source
# File lib/lhs/concerns/o_auth.rb, line 15
def lhs_store_oauth_access_token
  lhs_check_auto_oauth_enabled!
  LHS::Interceptors::AutoOauth::ThreadRegistry.access_token = instance_exec(&LHS.config.auto_oauth)
end