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