class OmniAuth::Strategies::WalletOne

Public Instance Methods

credentials() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/walletone.rb, line 57
def credentials
  creds = super
  creds['expires'] = raw_info['ExpireDate']
  creds
end
raw_info() click to toggle source
# File lib/omniauth/strategies/walletone.rb, line 63
def raw_info
  @raw_info ||= access_token.get('/OpenApi/sessions/current', headers: options[:headers], parse: options[:format]).parsed
end
set_json_format() click to toggle source
# File lib/omniauth/strategies/walletone.rb, line 24
def set_json_format
  options[:headers] = {
    'Accept' => 'application/vnd.wallet.openapi.v1+json',
    'Content-Type' => 'application/vnd.wallet.openapi.v1+json'
  }
  options[:format] = :json
end
set_xml_format() click to toggle source
# File lib/omniauth/strategies/walletone.rb, line 32
def set_xml_format
  options[:headers] = {
    'Accept' => 'application/vnd.wallet.openapi.v1+xml',
    'Content-Type' => 'application/vnd.wallet.openapi.v1+xml'
  }
  options[:format] = :xml
end
setup_phase() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/walletone.rb, line 19
def setup_phase
  super
  options[:format].try(:to_sym) == :xml ? set_xml_format : set_json_format
end