From 23ed70fe50c3bd44efcc5e601740d94b228f5c2b Mon Sep 17 00:00:00 2001 From: Jon Oberheide Date: Mon, 24 Sep 2012 01:11:20 -0400 Subject: add useragent --- duo_openvpn.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/duo_openvpn.py b/duo_openvpn.py index 90c0b49..6a09e55 100755 --- a/duo_openvpn.py +++ b/duo_openvpn.py @@ -33,7 +33,12 @@ def sign(ikey, skey, method, host, uri, params): return 'Basic %s' % base64.b64encode(auth) def call(ikey, skey, host, method, path, **kwargs): - headers = {'Authorization':sign(ikey, skey, method, host, path, kwargs)} + sig = sign(ikey, skey, method, host, path, kwargs) + + headers = { + 'Authorization': sig, + 'User-agent': 'duo_openvpn/1.0', + } if method in [ 'POST', 'PUT' ]: headers['Content-type'] = 'application/x-www-form-urlencoded' -- cgit v1.2.3