lib/uaa/misc.rb in cf-uaa-lib-1.3.8 vs lib/uaa/misc.rb in cf-uaa-lib-1.3.9

- old
+ new

@@ -66,14 +66,13 @@ # be {https://login.cloudfoundry.com}, {https://uaa.cloudfoundry.com}, or # {http://localhost:8080/uaa}. # @return [String] url of UAA (or the target itself if it didn't provide a response) def self.discover_uaa(target) info = server(target) - if info['links'] && info['links']['uaa'] - info['links']['uaa'] - else - target - end + links = info['links'] || info[:links] + uaa = links['uaa'] || links[:uaa] + + uaa || target end # Gets the key from the server that is used to validate token signatures. If # the server is configured to use a symetric key, the caller must authenticate # by providing a a +client_id+ and +client_secret+. If the server