class OmniAuth::Strategies::Visma

Constants

AUTH_URLS

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/omniauth/strategies/visma.rb, line 23
def initialize(*args)
  super(*args)
  update_default_environment_urls
end

Public Instance Methods

change_environment() click to toggle source
# File lib/omniauth/strategies/visma.rb, line 53
def change_environment
  update_default_environment_urls
end
raw_info() click to toggle source
# File lib/omniauth/strategies/visma.rb, line 49
def raw_info
  @raw_info ||= access_token.get('/v2/companysettings').parsed
end

Private Instance Methods

callback_url() click to toggle source
# File lib/omniauth/strategies/visma.rb, line 66
def callback_url
  full_host + script_name + callback_path
end
update_default_environment_urls() click to toggle source
# File lib/omniauth/strategies/visma.rb, line 59
def update_default_environment_urls
  case options.environment
  when :sandbox
    options.client_options = options.client_options.merge( AUTH_URLS[options.environment] )
  end
end