{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/2","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/2/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/2/events","html_url":"https://github.com/IdentityServer/IdentityServer4.Demo/issues/2","id":305719976,"number":2,"title":"identity server 4 unauthorized_client ","user":{"login":"kamranbashir","id":17201741,"avatar_url":"https://avatars3.githubusercontent.com/u/17201741?v=4","gravatar_id":"","url":"https://api.github.com/users/kamranbashir","html_url":"https://github.com/kamranbashir","followers_url":"https://api.github.com/users/kamranbashir/followers","following_url":"https://api.github.com/users/kamranbashir/following{/other_user}","gists_url":"https://api.github.com/users/kamranbashir/gists{/gist_id}","starred_url":"https://api.github.com/users/kamranbashir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamranbashir/subscriptions","organizations_url":"https://api.github.com/users/kamranbashir/orgs","repos_url":"https://api.github.com/users/kamranbashir/repos","events_url":"https://api.github.com/users/kamranbashir/events{/privacy}","received_events_url":"https://api.github.com/users/kamranbashir/received_events","type":"User","site_admin":false},"labels":[{"id":496312480,"url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-15T21:07:45Z","updated_at":"2018-05-04T09:55:54Z","closed_at":"2018-05-04T09:55:54Z","author_association":"NONE","body":"hi,\r\n\r\ni am using your code and for getting token i am using following link:\r\nhttps://medium.com/all-technology-feeds/testing-your-asp-net-core-webapi-secured-with-identityserver4-in-postman-97eee976aa16\r\n\r\nyour code is below mentioned for postman, all getting unauthorized_client  error\r\n\r\n\r\n            return new List<Client>\r\n            {\r\n                // native clients\r\n                new Client\r\n                {\r\n                    ClientId = \"native.hybrid\",\r\n                    ClientName = \"Native Client (Hybrid with PKCE)\",\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    RequireClientSecret = false,\r\n\r\n                    AllowedGrantTypes = GrantTypes.Hybrid,\r\n                    RequirePkce = true,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n\r\n                    AllowOfflineAccess = true,\r\n                    RefreshTokenUsage = TokenUsage.ReUse\r\n                },\r\n                new Client\r\n                {\r\n                    ClientId = \"server.hybrid\",\r\n                    ClientName = \"Server-based Client (Hybrid)\",\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    ClientSecrets = { new Secret(\"secret\".Sha256()) },\r\n\r\n                    AllowedGrantTypes = GrantTypes.Hybrid,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n\r\n                    AllowOfflineAccess = true,\r\n                    RefreshTokenUsage = TokenUsage.ReUse\r\n                },\r\n                new Client\r\n                {\r\n                    ClientId = \"native.code\",\r\n                    ClientName = \"Native Client (Code with PKCE)\",\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    RequireClientSecret = false,\r\n\r\n                    AllowedGrantTypes = GrantTypes.Code,\r\n                    RequirePkce = true,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n\r\n                    AllowOfflineAccess = true,\r\n                    RefreshTokenUsage = TokenUsage.ReUse\r\n                },\r\n                new Client\r\n                {\r\n                    ClientId = \"server.code\",\r\n                    ClientName = \"Service Client (Code)\",\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    ClientSecrets = { new Secret(\"secret\".Sha256()) },\r\n\r\n                    AllowedGrantTypes = GrantTypes.Code,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n\r\n                    AllowOfflineAccess = true,\r\n                    RefreshTokenUsage = TokenUsage.ReUse\r\n                },\r\n\r\n                // server to server\r\n                new Client\r\n                {\r\n                    ClientId = \"client\",\r\n                    ClientSecrets = { new Secret(\"secret\".Sha256()) },\r\n\r\n                    AllowedGrantTypes = GrantTypes.ClientCredentials,\r\n                    AllowedScopes = { \"api\" },\r\n                },\r\n\r\n\r\n\r\n                 // kam - implicit (e.g. SPA or OIDC authentication)\r\n                new Client\r\n                {\r\n                    ClientId = \"kam\",\r\n                    ClientName = \"kam Client\",\r\n                    AllowAccessTokensViaBrowser = true,\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n                    FrontChannelLogoutUri = \"http://localhost:5000/signout-idsrv\", // for testing identityserver on localhost\r\n                    AllowedGrantTypes = GrantTypes.Code,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n                },\r\n\r\n                // implicit (e.g. SPA or OIDC authentication)\r\n                new Client\r\n                {\r\n                    ClientId = \"implicit\",\r\n                    ClientName = \"Implicit Client\",\r\n                    AllowAccessTokensViaBrowser = true,\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n                    FrontChannelLogoutUri = \"http://localhost:5000/signout-idsrv\", // for testing identityserver on localhost\r\n\r\n                    AllowedGrantTypes = GrantTypes.Implicit,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n                },\r\n\r\n                // implicit using reference tokens (e.g. SPA or OIDC authentication)\r\n                new Client\r\n                {\r\n                    ClientId = \"implicit.reference\",\r\n                    ClientName = \"Implicit Client using reference tokens\",\r\n                    AllowAccessTokensViaBrowser = true,\r\n\r\n                    AccessTokenType = AccessTokenType.Reference,\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    AllowedGrantTypes = GrantTypes.Implicit,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n                },\r\n\r\n                // implicit using reference tokens (e.g. SPA or OIDC authentication)\r\n                new Client\r\n                {\r\n                    ClientId = \"implicit.shortlived\",\r\n                    ClientName = \"Implicit Client using short-lived tokens\",\r\n                    AllowAccessTokensViaBrowser = true,\r\n\r\n                    AccessTokenLifetime = 70,\r\n\r\n                    RedirectUris = { \"https://www.getpostman.com/oauth2/callback\" },\r\n                    PostLogoutRedirectUris = { \"https://www.getpostman.com\" },\r\n\r\n                    AllowedGrantTypes = GrantTypes.Implicit,\r\n                    AllowedScopes = { \"openid\", \"profile\", \"email\", \"api\" },\r\n                }\r\n            };\r\n        }"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/comments/386555173","html_url":"https://github.com/IdentityServer/IdentityServer4.Demo/issues/2#issuecomment-386555173","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer4.Demo/issues/2","id":386555173,"user":{"login":"leastprivilege","id":1454075,"avatar_url":"https://avatars0.githubusercontent.com/u/1454075?v=4","gravatar_id":"","url":"https://api.github.com/users/leastprivilege","html_url":"https://github.com/leastprivilege","followers_url":"https://api.github.com/users/leastprivilege/followers","following_url":"https://api.github.com/users/leastprivilege/following{/other_user}","gists_url":"https://api.github.com/users/leastprivilege/gists{/gist_id}","starred_url":"https://api.github.com/users/leastprivilege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leastprivilege/subscriptions","organizations_url":"https://api.github.com/users/leastprivilege/orgs","repos_url":"https://api.github.com/users/leastprivilege/repos","events_url":"https://api.github.com/users/leastprivilege/events{/privacy}","received_events_url":"https://api.github.com/users/leastprivilege/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T09:55:54Z","updated_at":"2018-05-04T09:55:54Z","author_association":"OWNER","body":"This repo is not really for answering questions - just to provide the demo source code."}}
{"actor":{"display_login":"leastprivilege"}}