{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/3548","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer3","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/3548/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/3548/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/3548/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/3548","id":210896824,"number":3548,"title":"IdentityModel, Version=2.5.1.0 UserInfoClient changed from version Version=1.0.0.0 broken in sample when upgraded","user":{"login":"wlafrance","id":6207782,"avatar_url":"https://avatars0.githubusercontent.com/u/6207782?v=3","gravatar_id":"","url":"https://api.github.com/users/wlafrance","html_url":"https://github.com/wlafrance","followers_url":"https://api.github.com/users/wlafrance/followers","following_url":"https://api.github.com/users/wlafrance/following{/other_user}","gists_url":"https://api.github.com/users/wlafrance/gists{/gist_id}","starred_url":"https://api.github.com/users/wlafrance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlafrance/subscriptions","organizations_url":"https://api.github.com/users/wlafrance/orgs","repos_url":"https://api.github.com/users/wlafrance/repos","events_url":"https://api.github.com/users/wlafrance/events{/privacy}","received_events_url":"https://api.github.com/users/wlafrance/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-28T20:40:08Z","updated_at":"2017-02-28T20:46:49Z","closed_at":null,"body":"- [X ] I read and understood how to enable [logging](https://identityserver.github.io/Documentation/docsv2/configuration/logging.html)\r\n\r\n### Question / Issue\r\nThe Assembly IdentityModel, Version=2.5.1.0 for IdentityModel.Client UserInfoClient\r\npublic methods have changed.. \r\nIn the sample code MVC OWIN Client (Hybrid) startup.cs file around line 66.  \r\nUses Version=1.0.0.0 (IdentityModel.Client  UserInfoClient)\r\n // use the access token to retrieve claims from userinfo\r\n                            var userInfoClient = new UserInfoClient(\r\n                            new Uri(Constants.UserInfoEndpoint),\r\n                            tokenResponse.AccessToken);\r\n\r\nThis no longer compiles when used with the new version, what should be used since the parameters for the methods have changed...\r\nOLD VERSION\r\n`namespace IdentityModel.Client\r\n{\r\n    public class UserInfoClient\r\n    {\r\n        public UserInfoClient(Uri endpoint, string token);\r\n        public UserInfoClient(Uri endpoint, string token, HttpMessageHandler innerHttpMessageHandler);`\r\n\r\nNEW VERSION\r\n`namespace IdentityModel.Client\r\n{\r\n    public class UserInfoClient\r\n    {\r\n        public UserInfoClient(string endpoint);\r\n        public UserInfoClient(string endpoint, HttpMessageHandler innerHttpMessageHandler);`\r\n\r\n### Relevant parts of the log file\r\n\r\n```\r\n<log goes here>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/comments/283155643","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/3548#issuecomment-283155643","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/3548","id":283155643,"user":{"login":"wlafrance","id":6207782,"avatar_url":"https://avatars0.githubusercontent.com/u/6207782?v=3","gravatar_id":"","url":"https://api.github.com/users/wlafrance","html_url":"https://github.com/wlafrance","followers_url":"https://api.github.com/users/wlafrance/followers","following_url":"https://api.github.com/users/wlafrance/following{/other_user}","gists_url":"https://api.github.com/users/wlafrance/gists{/gist_id}","starred_url":"https://api.github.com/users/wlafrance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlafrance/subscriptions","organizations_url":"https://api.github.com/users/wlafrance/orgs","repos_url":"https://api.github.com/users/wlafrance/repos","events_url":"https://api.github.com/users/wlafrance/events{/privacy}","received_events_url":"https://api.github.com/users/wlafrance/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T20:46:49Z","updated_at":"2017-02-28T20:46:49Z","body":"This is what I have changed it to.  Just wondering if this is the correct approach?\r\n\r\n`\r\n                        // use the access token to retrieve claims from userinfo\r\n                        var userInfoClient = new UserInfoClient(new Uri(Constants.UserInfoEndpoint).ToString());\r\n                        //var userInfoClient = new UserInfoClient(\r\n                        //   new Uri(Constants.UserInfoEndpoint),\r\n                        //   tokenResponse.AccessToken);\r\n                        var userInfoResponse = await userInfoClient.GetAsync(tokenResponse.AccessToken);  //.GetAsync();\r\n\r\n                        // create new identity\r\n                        var id = new ClaimsIdentity(n.AuthenticationTicket.Identity.AuthenticationType);\r\n                        id.AddClaims(userInfoResponse.Claims);\r\n                        //id.AddClaims(userInfoResponse.GetClaimsIdentity().Claims);`"}}
{"actor":{"display_login":"wlafrance"}}