{"action":"closed","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2706","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer3","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2706/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2706/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/2706/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/2706","id":140667710,"number":2706,"title":"Possible bug in ScopeSecretValidator","user":{"login":"maxkornev","id":17569744,"avatar_url":"https://avatars.githubusercontent.com/u/17569744?v=3","gravatar_id":"","url":"https://api.github.com/users/maxkornev","html_url":"https://github.com/maxkornev","followers_url":"https://api.github.com/users/maxkornev/followers","following_url":"https://api.github.com/users/maxkornev/following{/other_user}","gists_url":"https://api.github.com/users/maxkornev/gists{/gist_id}","starred_url":"https://api.github.com/users/maxkornev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxkornev/subscriptions","organizations_url":"https://api.github.com/users/maxkornev/orgs","repos_url":"https://api.github.com/users/maxkornev/repos","events_url":"https://api.github.com/users/maxkornev/events{/privacy}","received_events_url":"https://api.github.com/users/maxkornev/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":4,"created_at":"2016-03-14T13:05:34Z","updated_at":"2016-03-15T07:37:30Z","closed_at":"2016-03-15T07:37:30Z","body":"Hi\r\nRecently i watched class ScopeSecretValidator and i think that method ValidateAsync doesn't work properly. \r\nClient info parsed using SecretParser this way:\r\n`var parsedSecret = await _parser.ParseAsync(_environment.Environment);`\r\nAnd then scope is defined this way:\r\n`var scope = (await _scopes.FindScopesAsync(new[] { parsedSecret.Id })).FirstOrDefault();`\r\nInto FindScopeAsync passed **parsedSecret.Id** that is client_id, but this method expects scope name according its signature and implementation:\r\n```\r\npublic Task<IEnumerable<Scope>> FindScopesAsync(IEnumerable<string> scopeNames)\r\n        {\r\n            if (scopeNames == null) throw new ArgumentNullException(\"scopeNames\");\r\n            \r\n            var scopes = from s in _scopes\r\n                         where scopeNames.ToList().Contains(s.Name)\r\n                         select s;\r\n\r\n            return Task.FromResult<IEnumerable<Scope>>(scopes.ToList());\r\n        }\r\n```\r\n\r\nAs the result validation is always failed."}}