diff options
author | Pranay Suresh <psuresh@teslamotors.com> | 2016-04-07 17:15:33 -0700 |
---|---|---|
committer | Pranay Suresh <psuresh@teslamotors.com> | 2016-04-07 17:15:33 -0700 |
commit | 8cb8cf769b5b502bcd31e3f40b8506df09125504 (patch) | |
tree | c8c61ec881ee1920574ea1549c0f60676d94b2a1 | |
parent | 43de66aaa7b4b6bef385bb89877653b45b621a58 (diff) | |
download | webtest-8cb8cf769b5b502bcd31e3f40b8506df09125504.tar.gz |
support bearer auth
-rw-r--r-- | webtest/app.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/webtest/app.py b/webtest/app.py index 8110ed8..a0da8cf 100644 --- a/webtest/app.py +++ b/webtest/app.py @@ -204,6 +204,8 @@ class TestApp(object): val = ':'.join(list(val)) val = b64encode(to_bytes(val)).strip() val = val.decode('latin1') + elif authtype == 'Bearer' and val and isinstance(val, (str, unicode)): + val = val.strip() else: raise ValueError(invalid_value) value = str('%s %s' % (authtype, val)) |