{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2008","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2008/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2008/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2008/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2008","id":110476092,"number":2008,"title":"How do users get authorised using IdentityServerBearerTokenAuthenticationOptions in a webAPI 2.0 application?","user":{"login":"setiseeker","id":1572716,"avatar_url":"https://avatars.githubusercontent.com/u/1572716?v=3","gravatar_id":"","url":"https://api.github.com/users/setiseeker","html_url":"https://github.com/setiseeker","followers_url":"https://api.github.com/users/setiseeker/followers","following_url":"https://api.github.com/users/setiseeker/following{/other_user}","gists_url":"https://api.github.com/users/setiseeker/gists{/gist_id}","starred_url":"https://api.github.com/users/setiseeker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setiseeker/subscriptions","organizations_url":"https://api.github.com/users/setiseeker/orgs","repos_url":"https://api.github.com/users/setiseeker/repos","events_url":"https://api.github.com/users/setiseeker/events{/privacy}","received_events_url":"https://api.github.com/users/setiseeker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-08T15:28:21Z","updated_at":"2015-11-13T10:43:43Z","closed_at":"2015-10-15T04:49:14Z","body":"Hi,\r\n\r\nI have a webapi 2 api and have setup an IdentityServer3 instance.\r\n\r\nI am trying to configure the API to use Bearer tokens from the Identity Server to authenticate and authorize incoming calls to the api from 3rd party apps.\r\n\r\nMy API is configured using OWIN and the following code:\r\n            app.UseIdentityServerBearerTokenAuthentication(new      IdentityServerBearerTokenAuthenticationOptions\r\n            {\r\n                Authority = \"https://myserver.com/identityServer/core\",\r\n                AuthenticationMode = AuthenticationMode.Active,\r\n                ValidationMode = ValidationMode.ValidationEndpoint,\r\n                RequiredScopes = new[] { \"email\" }\r\n            });\r\n\r\nIf i look at the Identity Server logs, my API is receiving the token and validating that token successfully against the Identity Server (when a client app calls) using the above code, but after that my API returns 401's. I assume something is not getting set or configured to handle this.\r\n\r\nSo my question is, how do I validate, authorize or set the claims for a token once it is received and validated by the Identity server. \r\n\r\nI do apologize for a question that must have a simple answer, but I believe I have missed something in the documentation or the samples about how to resolve this.\r\n\r\nThanks\r\n\r\n<!---\r\n@huboard:{\"custom_state\":\"archived\"}\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/comments/156394395","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2008#issuecomment-156394395","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2008","id":156394395,"user":{"login":"setiseeker","id":1572716,"avatar_url":"https://avatars.githubusercontent.com/u/1572716?v=3","gravatar_id":"","url":"https://api.github.com/users/setiseeker","html_url":"https://github.com/setiseeker","followers_url":"https://api.github.com/users/setiseeker/followers","following_url":"https://api.github.com/users/setiseeker/following{/other_user}","gists_url":"https://api.github.com/users/setiseeker/gists{/gist_id}","starred_url":"https://api.github.com/users/setiseeker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setiseeker/subscriptions","organizations_url":"https://api.github.com/users/setiseeker/orgs","repos_url":"https://api.github.com/users/setiseeker/repos","events_url":"https://api.github.com/users/setiseeker/events{/privacy}","received_events_url":"https://api.github.com/users/setiseeker/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T10:43:43Z","updated_at":"2015-11-13T10:43:43Z","body":"I have resolved my issue. \r\nThe problem was Scopes and Scope Claims. Working through the MVC Authentication Sample Application several times highlighted my issue.\r\n\r\nThanks"}}