6 f =
'/tmp/openvpn_sso_user'
7 with open (f,
"r")
as myfile:
8 session_key = myfile.read().replace(
'\n',
'')
10 conn = httplib.HTTPConnection(
"10.8.0.1:8080")
11 conn.request(
"GET",
"/" + session_key)
12 r1 = conn.getresponse()
15 body = r1.read().rstrip()
17 elif r1.status == 404:
18 print "Authentication failed"
20 print r1.status, r1.reason