{"action":"opened","issue":{"url":"https://api.github.com/repos/James1345/django-rest-knox/issues/17","repository_url":"https://api.github.com/repos/James1345/django-rest-knox","labels_url":"https://api.github.com/repos/James1345/django-rest-knox/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/James1345/django-rest-knox/issues/17/comments","events_url":"https://api.github.com/repos/James1345/django-rest-knox/issues/17/events","html_url":"https://github.com/James1345/django-rest-knox/issues/17","id":156171797,"number":17,"title":"can't get token","user":{"login":"HassanMortazavi","id":17066884,"avatar_url":"https://avatars.githubusercontent.com/u/17066884?v=3","gravatar_id":"","url":"https://api.github.com/users/HassanMortazavi","html_url":"https://github.com/HassanMortazavi","followers_url":"https://api.github.com/users/HassanMortazavi/followers","following_url":"https://api.github.com/users/HassanMortazavi/following{/other_user}","gists_url":"https://api.github.com/users/HassanMortazavi/gists{/gist_id}","starred_url":"https://api.github.com/users/HassanMortazavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HassanMortazavi/subscriptions","organizations_url":"https://api.github.com/users/HassanMortazavi/orgs","repos_url":"https://api.github.com/users/HassanMortazavi/repos","events_url":"https://api.github.com/users/HassanMortazavi/events{/privacy}","received_events_url":"https://api.github.com/users/HassanMortazavi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-22T20:45:08Z","updated_at":"2016-05-22T20:45:08Z","closed_at":null,"body":"hi\r\ni have a error when i wanna get token with send post request to /api/auth/login  with basic Authorization header.\r\n\r\n\r\npython 3.4    django 1.9.4\r\n\r\n\r\n\r\nsettings.py:\r\n\r\nINSTALLED_APPS = [\r\n    ....\r\n    'rest_framework',\r\n    'knox',\r\n     ....\r\n]\r\n\r\nREST_FRAMEWORK = {\r\n    'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),\r\n    'DEFAULT_AUTHENTICATION_CLASSES': (\r\n        'rest_framework.authentication.BasicAuthentication',\r\n        'rest_framework.authentication.SessionAuthentication',\r\n    ),\r\n    'PAGE_SIZE': 10,\r\n    'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)\r\n}\r\n\r\nREST_KNOX = {\r\n  'SECURE_HASH_ALGORITHM': 'cryptography.hazmat.primitives.hashes.SHA512',\r\n  'AUTH_TOKEN_CHARACTER_LENGTH': 64,\r\n  'TOKEN_TTL': 10,\r\n  'USER_SERIALIZER': 'knox.serializers.UserSerializer',\r\n}\r\n\r\n\r\n\r\n\r\nurls.py:\r\nfrom django.conf.urls import url, include\r\nurlpatterns = [\r\n  url(r'api/auth/', include('knox.urls'))\r\n]\r\n\r\n\r\n\r\n\r\n\r\nInternal Server Error: /api/auth/login/\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py\", line 149, in get_response\r\n    response = self.process_exception_by_middleware(e, request)\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py\", line 147, in get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/views/decorators/csrf.py\", line 58, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/views/generic/base.py\", line 68, in view\r\n    return self.dispatch(request, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/rest_framework/views.py\", line 466, in dispatch\r\n    response = self.handle_exception(exc)\r\n  File \"/usr/local/lib/python3.4/dist-packages/rest_framework/views.py\", line 463, in dispatch\r\n    response = handler(request, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/knox/views.py\", line 19, in post\r\n    token = AuthToken.objects.create(request.user)\r\n  File \"/usr/local/lib/python3.4/dist-packages/knox/models.py\", line 14, in create\r\n    digest = crypto.hash_token(token, salt)\r\n  File \"/usr/local/lib/python3.4/dist-packages/knox/crypto.py\", line 32, in hash_token\r\n    digest = hashes.Hash(sha(), backend=default_backend())\r\n  File \"/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py\", line 35, in default_backend\r\n    _default_backend = MultiBackend(_available_backends())\r\n  File \"/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py\", line 22, in _available_backends\r\n    \"cryptography.backends\"\r\n  File \"/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py\", line 21, in <listcomp>\r\n    for ep in pkg_resources.iter_entry_points(\r\nAttributeError: 'EntryPoint' object has no attribute 'resolve'\r\n"}}
{"actor":{"display_login":"HassanMortazavi"}}