Module: OauthDoorman::UserInfoAPI
Instance Method Summary collapse
Methods included from Error
Instance Method Details
#get_user_email ⇒ Object
7 8 9 10 11 |
# File 'lib/oauth_doorman/oauth_user_info_api.rb', line 7 def get_user_email() result_hash = get_user_info() return result_hash["email"] end |
#get_user_info ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/oauth_doorman/oauth_user_info_api.rb', line 13 def get_user_info() result = nil begin url = "#{config[:user_info_url]}?access_token=#{access_token}" http = HTTPClient.new result = http.get(url).body process_error(result) rescue Exception => exception raise exception end return JSON.parse(result) end |