class OmniAuth::Strategies::Naver

Private Instance Methods

gender() click to toggle source
# File lib/omniauth/strategies/naver.rb, line 32
def gender
  return if raw_properties['gender'].nil?
  return 'male' if raw_properties['gender'].include? 'M'
  return 'female' if raw_properties['gender'].include? 'F'
end
image() click to toggle source
# File lib/omniauth/strategies/naver.rb, line 38
def image
  return if raw_properties['profile_image'].nil?
  return raw_properties['profile_image'].sub('?type=s80', '') unless raw_properties['profile_image'].include? 'nodata_33x33.gif'
end
raw_info() click to toggle source
# File lib/omniauth/strategies/naver.rb, line 43
def raw_info
  @raw_info ||= access_token.get('https://openapi.naver.com/v1/nid/me').parsed
end
raw_properties() click to toggle source
# File lib/omniauth/strategies/naver.rb, line 47
def raw_properties
  @raw_properties ||= raw_info['response']
end