{"action":"created","issue":{"url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/30","labels_url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/30/comments","events_url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/30/events","html_url":"https://github.com/mwarkentin/django-watchman/pull/30","id":88965442,"number":30,"title":"Add support for optional login_required decorator to require user authentication","user":{"login":"blag","id":597113,"avatar_url":"https://avatars.githubusercontent.com/u/597113?v=3","gravatar_id":"","url":"https://api.github.com/users/blag","html_url":"https://github.com/blag","followers_url":"https://api.github.com/users/blag/followers","following_url":"https://api.github.com/users/blag/following{/other_user}","gists_url":"https://api.github.com/users/blag/gists{/gist_id}","starred_url":"https://api.github.com/users/blag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blag/subscriptions","organizations_url":"https://api.github.com/users/blag/orgs","repos_url":"https://api.github.com/users/blag/repos","events_url":"https://api.github.com/users/blag/events{/privacy}","received_events_url":"https://api.github.com/users/blag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-17T09:21:22Z","updated_at":"2015-06-23T20:56:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mwarkentin/django-watchman/pulls/30","html_url":"https://github.com/mwarkentin/django-watchman/pull/30","diff_url":"https://github.com/mwarkentin/django-watchman/pull/30.diff","patch_url":"https://github.com/mwarkentin/django-watchman/pull/30.patch"},"body":"This should allow Django's sessions, OAuth, HTTP Auth, etc. to be utilized to protect the status view."},"comment":{"url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/comments/114639890","html_url":"https://github.com/mwarkentin/django-watchman/pull/30#issuecomment-114639890","issue_url":"https://api.github.com/repos/mwarkentin/django-watchman/issues/30","id":114639890,"user":{"login":"blag","id":597113,"avatar_url":"https://avatars.githubusercontent.com/u/597113?v=3","gravatar_id":"","url":"https://api.github.com/users/blag","html_url":"https://github.com/blag","followers_url":"https://api.github.com/users/blag/followers","following_url":"https://api.github.com/users/blag/following{/other_user}","gists_url":"https://api.github.com/users/blag/gists{/gist_id}","starred_url":"https://api.github.com/users/blag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blag/subscriptions","organizations_url":"https://api.github.com/users/blag/orgs","repos_url":"https://api.github.com/users/blag/repos","events_url":"https://api.github.com/users/blag/events{/privacy}","received_events_url":"https://api.github.com/users/blag/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T20:56:54Z","updated_at":"2015-06-23T20:56:54Z","body":"I was planning on utilizing an OAuth client to check the status, which necessitates using the normal Django `@login_required` decorator. Incidentally, using that decorator allows us to use normal passwords/cookies, JWT, HTTP headers, etc. to authenticate users).\r\n\r\nPut simply, I feel much more comfortable using a default, highly flexible, widely-deployed decorator (eg: `@login_required`) that's already used in production systems than a static, settings-defined token to authenticate users.\r\n\r\nThere might also be interest in using the `@login_required` decorator for the dashboard as well, because a static token-based authentication mechanism doesn't really fit well for that. That means we might want to have different authentication mechanisms for the JSON status endpoint and the dashboard endpoint.\r\n\r\nI'll fix up the current issues."}}