Revision 6e441a16 pithos/lib/client.py
b/pithos/lib/client.py | ||
---|---|---|
953 | 953 |
|
954 | 954 |
#print '**', response.status, headers, data, '\n' |
955 | 955 |
return response.status, headers, data |
956 |
|
|
957 |
def authenticate(authentication_host, token): |
|
958 |
con = HTTPConnection(authentication_host) |
|
959 |
kwargs = {} |
|
960 |
kwargs['headers'] = {} |
|
961 |
kwargs['headers']['X-Auth-Token'] = token |
|
962 |
kwargs['headers']['Content-Length'] = 0 |
|
963 |
|
|
964 |
path = '/im/authenticate' |
|
965 |
con.request('GET', path, **kwargs) |
|
966 |
response = con.getresponse() |
|
967 |
return _handle_response(response) |
Also available in: Unified diff