# File lib/puppet/network/http/webrick/rest.rb, line 58 58: def client_information(request) 59: result = {} 60: if peer = request.peeraddr and ip = peer[3] 61: result[:ip] = ip 62: end 63: 64: # If they have a certificate (which will almost always be true) 65: # then we get the hostname from the cert, instead of via IP 66: # info 67: result[:authenticated] = false 68: if cert = request.client_cert and nameary = cert.subject.to_a.find { |ary| ary[0] == "CN" } 69: result[:node] = nameary[1] 70: result[:authenticated] = true 71: else 72: result[:node] = resolve_node(result) 73: end 74: 75: result 76: end