{"action":"created","issue":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/250","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/250/comments","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/250/events","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250","id":108981598,"number":250,"title":"Pkeyauth + Broker + Device profile + Mega RT","user":{"login":"kpanwar","id":5713915,"avatar_url":"https://avatars.githubusercontent.com/u/5713915?v=3","gravatar_id":"","url":"https://api.github.com/users/kpanwar","html_url":"https://github.com/kpanwar","followers_url":"https://api.github.com/users/kpanwar/followers","following_url":"https://api.github.com/users/kpanwar/following{/other_user}","gists_url":"https://api.github.com/users/kpanwar/gists{/gist_id}","starred_url":"https://api.github.com/users/kpanwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpanwar/subscriptions","organizations_url":"https://api.github.com/users/kpanwar/orgs","repos_url":"https://api.github.com/users/kpanwar/repos","events_url":"https://api.github.com/users/kpanwar/events{/privacy}","received_events_url":"https://api.github.com/users/kpanwar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/labels/cla-signed","name":"cla-signed","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-29T23:39:34Z","updated_at":"2015-10-06T22:45:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/pulls/250","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250","diff_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250.diff","patch_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250.patch"},"body":"Code to support Pkeyauth (desktop/winRT) + Broker(xamarin/iOS) + Device profile(all) + Mega RT (all)\n<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23issuecomment-144582138%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23issuecomment-145427309%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r40986845%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41110015%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41169921%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41170295%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41171672%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41177555%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41178609%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41180618%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41182521%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41182664%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41184735%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41212501%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41288052%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41288057%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41288282%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41288353%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41291880%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41331300%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41331365%22%2C%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41332119%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23issuecomment-144582138%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22__%40kpanwar__%2C%20Thanks%20for%20signing%20the%20contribution%20license%20agreement%20so%20quickly%21%20Actual%20humans%20will%20now%20validate%20the%20agreement%20and%20then%20evaluate%20the%20PR.%5Cr%5Cn%3Cbr%20/%3EThanks%2C%20MSBOT%3B%22%2C%20%22created_at%22%3A%20%222015-10-01T00%3A27%3A06Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/9287708%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/msftclas%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-10-05T04%3A28%3A46Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL.Android/BrokerHelper.cs%2077%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41169921%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22shouldn%27t%20we%20check%20both%20canSwitchToBroker%20and%20verifyUser%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T17%3A10%3A45Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22can%20switch%20to%20broker%20check%20happens%20in%20AcquireTokenHandlerBase%20as%20it%20needs%20to%20apply%20for%20all%20platforms%22%2C%20%22created_at%22%3A%20%222015-10-05T23%3A52%3A13Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-10-06T16%3A30%3A14Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.Android/BrokerHelper.cs%3AL1-186%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL/TokenCache.cs%2015%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41184735%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Is%20this%20updating%20the%20refresh%20token%20of%20existing%20cache%3F%20and%20you%20throw%20out%20the%20exception%20if%20there%20are%20multiple%20entries%20when%20there%20is%20a%20clientid%2C%20userid%20matching%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T19%3A16%3A26Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222015-10-06T22%3A31%3A27Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL/TokenCache.cs%3AL357-375%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL.Desktop/Native/NCryptNative.cs%2092%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41177555%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22what%20do%20you%20mean%20by%20error%20success%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T18%3A14%3A11Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22Error%20code%20%3D%200%20implies%20success.%20It%20is%20the%20standard%20return%20code%20strategy.%20This%20code%20was%20borrowed%20%20from%20CLR%20security%20project.%22%2C%20%22created_at%22%3A%20%222015-10-05T18%3A22%3A17Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222015-10-06T16%3A32%3A01Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.Desktop/Native/NCryptNative.cs%3AL1-878%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL.iOS/AuthenticationContinuationHelper.cs%2029%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41180618%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Where%20is%20this%20used%3F%20and%20what%20if%20the%20souce%20application%20is%20company%20portal%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T18%3A39%3A50Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222015-10-06T17%3A02%3A45Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.iOS/AuthenticationContinuationHelper.cs%3AL1-39%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL/AcquireDeviceCodeHandler.cs%2097%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41182521%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22so%2C%20are%20you%20just%20throwing%20exception%20if%20authority%20type%20for%20acquiring%20user%20code%20is%20ADFS%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T18%3A56%3A12Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22ok%2C%20i%20see.%20you%20basically%20don%27t%20support%20ADFS%20for%20the%20whole%20device%20profile%20flow.%20%22%2C%20%22created_at%22%3A%20%222015-10-05T18%3A57%3A34Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222015-10-06T16%3A32%3A42Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL/AcquireDeviceCodeHandler.cs%3AL1-104%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL.Android/BrokerHelper.cs%20155%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41170295%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Use%20the%20constant%20value.%20%22%2C%20%22created_at%22%3A%20%222015-10-05T17%3A14%3A03Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-10-06T16%3A30%3A14Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.Android/BrokerHelper.cs%3AL1-186%22%7D%2C%20%22Pull%20b20cdbf085e6cc53a4ca6b7f53294fb6cb9de6fa%20src/ADAL.PCL.Android/AuthenticationAgentContinuationHelper.cs%2020%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r40986845%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Can%20you%20make%20all%20the%20result%20code%20constant%20value%3F%20it%27s%20hard%20to%20tell%20what%20does%20those%20mean.%20%22%2C%20%22created_at%22%3A%20%222015-10-02T02%3A14%3A43Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-10-05T04%3A28%3A46Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.Android/AuthenticationAgentContinuationHelper.cs%3AL25-56%22%7D%2C%20%22Pull%20964dd3c781d40ebe5ff5aa0ce4a30950064178c6%20src/ADAL.PCL.Android/BrokerProxy.cs%20418%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250%23discussion_r41171672%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22did%20we%20talk%20about%20instead%20of%20overriding%20the%20redirect%20uri%20developer%20provides%2C%20we%20should%20check%20if%20the%20redirect%20uri%20they%20provide%20is%20correct%20for%20broker%20functionality%20and%20throw%20the%20exception%20if%20not%3F%22%2C%20%22created_at%22%3A%20%222015-10-05T17%3A25%3A54Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%2C%20%7B%22body%22%3A%20%22this%20is%20the%20current%20behavior%20that%20I%20am%20mimicing%20from%20Android.%20If%20you%20have%20not%20changed%20this%20then%20we%20should%20discuss%20in%20the%20scrum.%22%2C%20%22created_at%22%3A%20%222015-10-06T22%3A32%3A24Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/5713915%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/kpanwar%22%7D%7D%2C%20%7B%22body%22%3A%20%22There%20is%20already%20a%20github%20issue%20filed%20for%20this.%20I%20haven%27t%20made%20the%20fix%20yet%2C%20but%20we%20should%20fix%20it.%20%22%2C%20%22created_at%22%3A%20%222015-10-06T22%3A40%3A49Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1166233%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/weijjia%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/ADAL.PCL.Android/BrokerProxy.cs%3AL1-664%22%7D%7D%7D'></a>\n<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>\n- [ ] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL.Android/BrokerProxy.cs 418'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41171672'>File: src/ADAL.PCL.Android/BrokerProxy.cs:L1-664</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> did we talk about instead of overriding the redirect uri developer provides, we should check if the redirect uri they provide is correct for broker functionality and throw the exception if not?\n- <a href='https://github.com/kpanwar'><img border=0 src='https://avatars.githubusercontent.com/u/5713915?v=3' height=16 width=16'></a> this is the current behavior that I am mimicing from Android. If you have not changed this then we should discuss in the scrum.\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> There is already a github issue filed for this. I haven't made the fix yet, but we should fix it.\n- [x] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#issuecomment-144582138'>General Comment</a></b>\n- <a href='https://github.com/msftclas'><img border=0 src='https://avatars.githubusercontent.com/u/9287708?v=3' height=16 width=16'></a> __@kpanwar__, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.\n<br />Thanks, MSBOT;\n- [x] <a href='#crh-comment-Pull b20cdbf085e6cc53a4ca6b7f53294fb6cb9de6fa src/ADAL.PCL.Android/AuthenticationAgentContinuationHelper.cs 20'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r40986845'>File: src/ADAL.PCL.Android/AuthenticationAgentContinuationHelper.cs:L25-56</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> Can you make all the result code constant value? it's hard to tell what does those mean.\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL.Android/BrokerHelper.cs 77'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41169921'>File: src/ADAL.PCL.Android/BrokerHelper.cs:L1-186</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> shouldn't we check both canSwitchToBroker and verifyUser?\n- <a href='https://github.com/kpanwar'><img border=0 src='https://avatars.githubusercontent.com/u/5713915?v=3' height=16 width=16'></a> can switch to broker check happens in AcquireTokenHandlerBase as it needs to apply for all platforms\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL.Android/BrokerHelper.cs 155'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41170295'>File: src/ADAL.PCL.Android/BrokerHelper.cs:L1-186</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> Use the constant value.\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL.Desktop/Native/NCryptNative.cs 92'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41177555'>File: src/ADAL.PCL.Desktop/Native/NCryptNative.cs:L1-878</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> what do you mean by error success?\n- <a href='https://github.com/kpanwar'><img border=0 src='https://avatars.githubusercontent.com/u/5713915?v=3' height=16 width=16'></a> Error code = 0 implies success. It is the standard return code strategy. This code was borrowed  from CLR security project.\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL.iOS/AuthenticationContinuationHelper.cs 29'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41180618'>File: src/ADAL.PCL.iOS/AuthenticationContinuationHelper.cs:L1-39</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> Where is this used? and what if the souce application is company portal?\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL/AcquireDeviceCodeHandler.cs 97'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41182521'>File: src/ADAL.PCL/AcquireDeviceCodeHandler.cs:L1-104</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> so, are you just throwing exception if authority type for acquiring user code is ADFS?\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> ok, i see. you basically don't support ADFS for the whole device profile flow.\n- [x] <a href='#crh-comment-Pull 964dd3c781d40ebe5ff5aa0ce4a30950064178c6 src/ADAL.PCL/TokenCache.cs 15'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#discussion_r41184735'>File: src/ADAL.PCL/TokenCache.cs:L357-375</a></b>\n- <a href='https://github.com/weijjia'><img border=0 src='https://avatars.githubusercontent.com/u/1166233?v=3' height=16 width=16'></a> Is this updating the refresh token of existing cache? and you throw out the exception if there are multiple entries when there is a clientid, userid matching?\n\n\n<a href='https://www.codereviewhub.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>\n<a href='#crh-end'></a>"},"comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/comments/146025028","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/pull/250#issuecomment-146025028","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/250","id":146025028,"user":{"login":"weijjia","id":1166233,"avatar_url":"https://avatars.githubusercontent.com/u/1166233?v=3","gravatar_id":"","url":"https://api.github.com/users/weijjia","html_url":"https://github.com/weijjia","followers_url":"https://api.github.com/users/weijjia/followers","following_url":"https://api.github.com/users/weijjia/following{/other_user}","gists_url":"https://api.github.com/users/weijjia/gists{/gist_id}","starred_url":"https://api.github.com/users/weijjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weijjia/subscriptions","organizations_url":"https://api.github.com/users/weijjia/orgs","repos_url":"https://api.github.com/users/weijjia/repos","events_url":"https://api.github.com/users/weijjia/events{/privacy}","received_events_url":"https://api.github.com/users/weijjia/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T22:45:51Z","updated_at":"2015-10-06T22:45:51Z","body":":shipit: "}}