Repository: auth0/auth0-python

Issue:
authentication.Users(client_domain).tokeninfo fails
I've got a traceback:


```python
In [78]: user_authentication.tokeninfo(id_token)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-78-decf4417ce18> in <module>()
----> 1 user_authentication.tokeninfo(id_token)
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/auth0/v2/authentication/users.pyc in tokeninfo(self, jwt)
     47             url='https://%s/tokeninfo' % self.domain,
￼
     48             data={'id_token': jwt},
---> 49             headers={'Content-Type: application/json'}
     50         )
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/auth0/v2/authentication/base.pyc in post(self, url, data, headers)
      8     def post(self, url, data={}, headers={}):
      9         response = requests.post(url=url, data=json.dumps(data),
---> 10                                  headers=headers)
     11         return self._process_response(response)
     12
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
    107     """
    108
--> 109     return request('post', url, data=data, json=json, **kwargs)
    110
    111
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
     48
     49     session = sessions.Session()
---> 50     response = session.request(method=method, url=url, **kwargs)
     51     # By explicitly closing the session, we avoid leaving sockets open which
     52     # can trigger a ResourceWarning in some cases, and look like a memory leak
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, jso
n)
    452             hooks = hooks,
    453         )
--> 454         prep = self.prepare_request(req)
    455
    456         proxies = proxies or {}
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/sessions.pyc in prepare_request(self, request)
    386             auth=merge_setting(auth, self.auth),
    387             cookies=merged_cookies,
--> 388             hooks=merge_hooks(request.hooks, self.hooks),
    389         )
    390         return p
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/models.pyc in prepare(self, method, url, headers, files, data, params, auth, cookies, hooks, json)
    292         self.prepare_method(method)
    293         self.prepare_url(url, params)
--> 294         self.prepare_headers(headers)
    295         self.prepare_cookies(cookies)
    296         self.prepare_body(data, files, json)
 
/home/ale/.virtualenvs/auth0/lib/python2.7/site-packages/requests/models.pyc in prepare_headers(self, headers)
    400
    401         if headers:
--> 402             self.headers = CaseInsensitiveDict((to_native_string(name), value) for name, value in headers.items())
    403         else:
    404             self.headers = CaseInsensitiveDict()
 
AttributeError: 'set' object has no attribute 'items'
```

Discussion:

Patch:
diff --git a/auth0/v2/authentication/users.py b/auth0/v2/authentication/users.py
index e031a75..bec1b4d 100644
--- a/auth0/v2/authentication/users.py
+++ b/auth0/v2/authentication/users.py
@@ -46,5 +46,5 @@ class Users(AuthenticationBase):
         return self.post(
             url='https://%s/tokeninfo' % self.domain,
             data={'id_token': jwt},
-            headers={'Content-Type: application/json'}
+            headers={'Content-Type': 'application/json'}
         )


Test patch:
diff --git a/auth0/v2/test/authentication/test_users.py b/auth0/v2/test/authentication/test_users.py
index c842f55..446301d 100644
--- a/auth0/v2/test/authentication/test_users.py
+++ b/auth0/v2/test/authentication/test_users.py
@@ -27,5 +27,5 @@ class TestUsers(unittest.TestCase):
         mock_post.assert_called_with(
             url='https://my.domain.com/tokeninfo',
             data={'id_token': 'jwtoken'},
-            headers={'Content-Type: application/json'}
+            headers={'Content-Type': 'application/json'}
         )