lib/omniauth/strategies/broadworks.rb in omniauth-broadworks-1.0.0 vs lib/omniauth/strategies/broadworks.rb in omniauth-broadworks-1.0.1
- old
+ new
@@ -28,10 +28,11 @@
def api_uri
"#{options.endpoint}/user/#{username}/profile"
end
def username
- "#{request['username']}@#{options.domain}" if request['username']
+ return unless request['username']
+ request['username'].index('@') ? request['username'] : [request['username'], options.domain].join('@')
end
def xml_response
@xml_response ||= Nokogiri.XML(authentication_response.body)
end