Revision 8cec3671 kamaki/clients/astakos/__init__.py

b/kamaki/clients/astakos/__init__.py
53 53
        :returns: (dict) authentication information
54 54
        """
55 55
        self.token = token or self.token
56
        self._cache[self.token] = self.post('/tokens').json
56
        body = dict(auth=dict(token=dict(id=self.token)))
57
        self.set_headers('content-type', 'application/json')
58
        self._cache[self.token] = self.post('/tokens', data=body).json
57 59
        return self._cache[self.token]
58 60

  
59 61
    def get_services(self, token=None):

Also available in: Unified diff