{"action":"created","issue":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3190","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3190/labels{/name}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3190/comments","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3190/events","html_url":"https://github.com/zestedesavoir/zds-site/issues/3190","id":116649486,"number":3190,"title":"Une erreur (d'encodage ?) empêche d'utiliser l'API sur la bêta","user":{"login":"pierre-24","id":7889675,"avatar_url":"https://avatars.githubusercontent.com/u/7889675?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre-24","html_url":"https://github.com/pierre-24","followers_url":"https://api.github.com/users/pierre-24/followers","following_url":"https://api.github.com/users/pierre-24/following{/other_user}","gists_url":"https://api.github.com/users/pierre-24/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre-24/subscriptions","organizations_url":"https://api.github.com/users/pierre-24/orgs","repos_url":"https://api.github.com/users/pierre-24/repos","events_url":"https://api.github.com/users/pierre-24/events{/privacy}","received_events_url":"https://api.github.com/users/pierre-24/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/API","name":"API","color":"eb6420"},{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/BUG","name":"BUG","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-12T21:55:10Z","updated_at":"2015-11-13T09:18:02Z","closed_at":null,"body":"Lorsqu'on essaye de s'autentifier via l'API, c'est impossible, on obtient une erreur 500 :  \r\n\r\n```\r\nStacktrace (most recent call last):\r\n\r\n  File \"django/core/handlers/base.py\", line 111, in get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"django/views/generic/base.py\", line 69, in view\r\n    return self.dispatch(request, *args, **kwargs)\r\n  File \"django/utils/decorators.py\", line 29, in _wrapper\r\n    return bound_func(*args, **kwargs)\r\n  File \"django/views/decorators/csrf.py\", line 57, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"django/utils/decorators.py\", line 25, in bound_func\r\n    return func.__get__(self, type(self))(*args2, **kwargs2)\r\n  File \"braces/views/_forms.py\", line 22, in dispatch\r\n    return super(CsrfExemptMixin, self).dispatch(*args, **kwargs)\r\n  File \"django/views/generic/base.py\", line 87, in dispatch\r\n    return handler(request, *args, **kwargs)\r\n  File \"django/utils/decorators.py\", line 29, in _wrapper\r\n    return bound_func(*args, **kwargs)\r\n  File \"django/views/decorators/debug.py\", line 76, in sensitive_post_parameters_wrapper\r\n    return view(request, *args, **kwargs)\r\n  File \"django/utils/decorators.py\", line 25, in bound_func\r\n    return func.__get__(self, type(self))(*args2, **kwargs2)\r\n  File \"oauth2_provider/views/base.py\", line 170, in post\r\n    url, headers, body, status = self.create_token_response(request)\r\n  File \"oauth2_provider/views/mixins.py\", line 124, in create_token_response\r\n    return core.create_token_response(request)\r\n  File \"oauth2_provider/oauth2_backends.py\", line 106, in create_token_response\r\n    headers)\r\n  File \"oauthlib/oauth2/rfc6749/endpoints/base.py\", line 64, in wrapper\r\n    return f(endpoint, uri, *args, **kwargs)\r\n  File \"oauthlib/oauth2/rfc6749/endpoints/token.py\", line 100, in create_token_response\r\n    request, self.default_token_type)\r\n  File \"oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py\", line 101, in create_token_response\r\n    if not self.request_validator.authenticate_client(request):\r\n  File \"oauth2_provider/oauth2_validators.py\", line 166, in authenticate_client\r\n    authenticated = self._authenticate_basic_auth(request)\r\n  File \"oauth2_provider/oauth2_validators.py\", line 58, in _authenticate_basic_auth\r\n    encoding = request.encoding or 'utf-8'\r\n  File \"oauthlib/common.py\", line 412, in __getattr__\r\n    raise AttributeError(name)\r\n```\r\n\r\nL'erreur ressemble à ce qui est reporté là : https://github.com/idan/oauthlib/issues/363 ... Et semble avoir été corrigée. Reste à savoir si on utilise la dernière version de oauthlib.\r\n"},"comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments/156372698","html_url":"https://github.com/zestedesavoir/zds-site/issues/3190#issuecomment-156372698","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3190","id":156372698,"user":{"login":"GerardPaligot","id":1913901,"avatar_url":"https://avatars.githubusercontent.com/u/1913901?v=3","gravatar_id":"","url":"https://api.github.com/users/GerardPaligot","html_url":"https://github.com/GerardPaligot","followers_url":"https://api.github.com/users/GerardPaligot/followers","following_url":"https://api.github.com/users/GerardPaligot/following{/other_user}","gists_url":"https://api.github.com/users/GerardPaligot/gists{/gist_id}","starred_url":"https://api.github.com/users/GerardPaligot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerardPaligot/subscriptions","organizations_url":"https://api.github.com/users/GerardPaligot/orgs","repos_url":"https://api.github.com/users/GerardPaligot/repos","events_url":"https://api.github.com/users/GerardPaligot/events{/privacy}","received_events_url":"https://api.github.com/users/GerardPaligot/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T09:18:02Z","updated_at":"2015-11-13T09:18:02Z","body":"Tout à fait mais je pensais que ça venait de moi parce que Eskimon parvenait à se connecter. "}}