{"action":"opened","issue":{"url":"https://api.github.com/repos/evonove/django-oauth-toolkit/issues/257","labels_url":"https://api.github.com/repos/evonove/django-oauth-toolkit/issues/257/labels{/name}","comments_url":"https://api.github.com/repos/evonove/django-oauth-toolkit/issues/257/comments","events_url":"https://api.github.com/repos/evonove/django-oauth-toolkit/issues/257/events","html_url":"https://github.com/evonove/django-oauth-toolkit/issues/257","id":88006907,"number":257,"title":"Personal access tokens","user":{"login":"ssbb","id":3309586,"avatar_url":"https://avatars.githubusercontent.com/u/3309586?v=3","gravatar_id":"","url":"https://api.github.com/users/ssbb","html_url":"https://github.com/ssbb","followers_url":"https://api.github.com/users/ssbb/followers","following_url":"https://api.github.com/users/ssbb/following{/other_user}","gists_url":"https://api.github.com/users/ssbb/gists{/gist_id}","starred_url":"https://api.github.com/users/ssbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssbb/subscriptions","organizations_url":"https://api.github.com/users/ssbb/orgs","repos_url":"https://api.github.com/users/ssbb/repos","events_url":"https://api.github.com/users/ssbb/events{/privacy}","received_events_url":"https://api.github.com/users/ssbb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-13T13:44:48Z","updated_at":"2015-06-13T13:44:48Z","closed_at":null,"body":"I tried to implement something like GitHub personal access tokens with scopes support. It's no problem to do it with custom model and bearer tokens, but when I want to limit scopes too, I think that is a good idea to manage this logic with existing OAuth library.\r\n\r\nSo I see two ways to do this:\r\n\r\n1. Allow null values on `AccessToken` model for foreign key to `Application.\r\n2. Make all models swappable and not only `Application`.\r\n\r\nI am ready to prepare PR, but I would like to know which method is preferable. \r\n\r\nThanks :)"}}