{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Security/issues/206","labels_url":"https://api.github.com/repos/aspnet/Security/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Security/issues/206/comments","events_url":"https://api.github.com/repos/aspnet/Security/issues/206/events","html_url":"https://github.com/aspnet/Security/issues/206","id":65773943,"number":206,"title":"how to create OAuth Authorization Server","user":{"login":"vijayantkatyal","id":1795103,"avatar_url":"https://avatars.githubusercontent.com/u/1795103?v=3","gravatar_id":"","url":"https://api.github.com/users/vijayantkatyal","html_url":"https://github.com/vijayantkatyal","followers_url":"https://api.github.com/users/vijayantkatyal/followers","following_url":"https://api.github.com/users/vijayantkatyal/following{/other_user}","gists_url":"https://api.github.com/users/vijayantkatyal/gists{/gist_id}","starred_url":"https://api.github.com/users/vijayantkatyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijayantkatyal/subscriptions","organizations_url":"https://api.github.com/users/vijayantkatyal/orgs","repos_url":"https://api.github.com/users/vijayantkatyal/repos","events_url":"https://api.github.com/users/vijayantkatyal/events{/privacy}","received_events_url":"https://api.github.com/users/vijayantkatyal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-01T20:36:16Z","updated_at":"2015-04-02T05:18:38Z","closed_at":null,"body":"e.g.\r\n\r\nvar OAuthServerOptions = new OAuthAuthorizationServerOptions\r\n{\r\n    AllowInsecureHttp = true,\r\n    TokenEndpointPath = new PathString(\"/token\"),\r\n    AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(30),\r\n    Provider = container.Resolve<IOAuthAuthorizationServerProvider>(),\r\n    RefreshTokenProvider = container.Resolve<IAuthenticationTokenProvider>()\r\n};\r\n// Token Generation\r\napp.UseOAuthAuthorizationServer(OAuthServerOptions);\r\napp.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());\r\n\r\nhow to do this in asp.net 5 (vnext).\r\n\r\nreferences:\r\n\r\nhttp://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server\r\nhttp://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/\r\nhttp://aspnetguru.com/adding-authentication-to-asp-net-web-api/\r\nhttp://blogs.msdn.com/b/webdev/archive/2013/09/20/understanding-security-features-in-spa-template.aspx\r\nhttp://odetocode.com/blogs/scott/archive/2015/01/15/using-json-web-tokens-with-katana-and-webapi.aspx"},"comment":{"url":"https://api.github.com/repos/aspnet/Security/issues/comments/88738322","html_url":"https://github.com/aspnet/Security/issues/206#issuecomment-88738322","issue_url":"https://api.github.com/repos/aspnet/Security/issues/206","id":88738322,"user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars.githubusercontent.com/u/95136?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfowl","html_url":"https://github.com/davidfowl","followers_url":"https://api.github.com/users/davidfowl/followers","following_url":"https://api.github.com/users/davidfowl/following{/other_user}","gists_url":"https://api.github.com/users/davidfowl/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfowl/subscriptions","organizations_url":"https://api.github.com/users/davidfowl/orgs","repos_url":"https://api.github.com/users/davidfowl/repos","events_url":"https://api.github.com/users/davidfowl/events{/privacy}","received_events_url":"https://api.github.com/users/davidfowl/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T05:18:38Z","updated_at":"2015-04-02T05:18:38Z","body":"@leastprivilege This line of code is busted:\r\n\r\nhttps://github.com/IdentityServer/IdentityServer3.Samples/blob/master/source/AspNet5Host/src/IdentityServer3/Startup.cs#L21\r\n\r\nIt should be using IApplicationEnvironment"}}