{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/238","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/238/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/238/events","html_url":"https://github.com/IdentityServer/IdentityServer3.Samples/issues/238","id":137395322,"number":238,"title":"Purpose of read and write scopes in samples?","user":{"login":"farzad99","id":16258460,"avatar_url":"https://avatars.githubusercontent.com/u/16258460?v=3","gravatar_id":"","url":"https://api.github.com/users/farzad99","html_url":"https://github.com/farzad99","followers_url":"https://api.github.com/users/farzad99/followers","following_url":"https://api.github.com/users/farzad99/following{/other_user}","gists_url":"https://api.github.com/users/farzad99/gists{/gist_id}","starred_url":"https://api.github.com/users/farzad99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farzad99/subscriptions","organizations_url":"https://api.github.com/users/farzad99/orgs","repos_url":"https://api.github.com/users/farzad99/repos","events_url":"https://api.github.com/users/farzad99/events{/privacy}","received_events_url":"https://api.github.com/users/farzad99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T22:15:39Z","updated_at":"2016-02-29T22:21:51Z","closed_at":null,"body":"In some examples I've seen the following scopes:\r\n\r\n```\r\n                new Scope\r\n                {\r\n                    Name = \"read\",\r\n                    DisplayName = \"Read data\",\r\n                    Type = ScopeType.Resource,\r\n                    Emphasize = false,\r\n                },\r\n                new Scope\r\n                {\r\n                    Name = \"write\",\r\n                    DisplayName = \"Write data\",\r\n                    Type = ScopeType.Resource,\r\n                    Emphasize = true,\r\n                },\r\n```\r\n\r\nWhat's the benefit of such scopes that don't have any claims associated with them and don't describe a web api either? I'm guessing that we check if an authenticated user has; for example, the read scope to let her do something as in the code below?\r\n\r\n```\r\nif(context.Principal.HasClaim(\"scope\", \"read\"))\r\n{\r\n   //do something here\r\n}\r\n\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/comments/190424819","html_url":"https://github.com/IdentityServer/IdentityServer3.Samples/issues/238#issuecomment-190424819","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/238","id":190424819,"user":{"login":"brockallen","id":649492,"avatar_url":"https://avatars.githubusercontent.com/u/649492?v=3","gravatar_id":"","url":"https://api.github.com/users/brockallen","html_url":"https://github.com/brockallen","followers_url":"https://api.github.com/users/brockallen/followers","following_url":"https://api.github.com/users/brockallen/following{/other_user}","gists_url":"https://api.github.com/users/brockallen/gists{/gist_id}","starred_url":"https://api.github.com/users/brockallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brockallen/subscriptions","organizations_url":"https://api.github.com/users/brockallen/orgs","repos_url":"https://api.github.com/users/brockallen/repos","events_url":"https://api.github.com/users/brockallen/events{/privacy}","received_events_url":"https://api.github.com/users/brockallen/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T22:21:51Z","updated_at":"2016-02-29T22:21:51Z","body":"They describe a sample web api -- one API for \"reading\" data, and another API for \"writing\" data."}}