# File lib/omniauth/strategies/windows_live/windowslivelogin.rb, line 953 def getAppSecurityToken(siteid=nil, ip=nil) url = getAppLoginUrl(siteid, ip) begin ret = fetch url ret.value # raises exception if fetch failed body = ret.body body.scan(/\{"token":"(.*)"\}/){|match| return match } debug("Error: getAppSecurityToken: Failed to extract token: #{body}") rescue Exception => e debug("Error: getAppSecurityToken: Failed to get token: #{e}") end return end