{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cordova-android/pulls/comments/22887338","id":22887338,"diff_hunk":"@@ -0,0 +1,30 @@\n+/*\n+       Licensed to the Apache Software Foundation (ASF) under one\n+       or more contributor license agreements.  See the NOTICE file\n+       distributed with this work for additional information\n+       regarding copyright ownership.  The ASF licenses this file\n+       to you under the Apache License, Version 2.0 (the\n+       \"License\"); you may not use this file except in compliance\n+       with the License.  You may obtain a copy of the License at\n+\n+         http://www.apache.org/licenses/LICENSE-2.0\n+\n+       Unless required by applicable law or agreed to in writing,\n+       software distributed under the License is distributed on an\n+       \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+       KIND, either express or implied.  See the License for the\n+       specific language governing permissions and limitations\n+       under the License.\n+*/\n+package org.apache.cordova;\n+\n+import android.webkit.HttpAuthHandler;\n+import android.webkit.WebView;","path":"framework/src/org/apache/cordova/HttpAuthRequestHandler.java","position":22,"original_position":22,"commit_id":"05c805b9bc1b9df09449a4c12fb9b4fd5abcf9cb","original_commit_id":"05c805b9bc1b9df09449a4c12fb9b4fd5abcf9cb","user":{"login":"agrieve","id":1369484,"avatar_url":"https://avatars.githubusercontent.com/u/1369484?v=3","gravatar_id":"","url":"https://api.github.com/users/agrieve","html_url":"https://github.com/agrieve","followers_url":"https://api.github.com/users/agrieve/followers","following_url":"https://api.github.com/users/agrieve/following{/other_user}","gists_url":"https://api.github.com/users/agrieve/gists{/gist_id}","starred_url":"https://api.github.com/users/agrieve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrieve/subscriptions","organizations_url":"https://api.github.com/users/agrieve/orgs","repos_url":"https://api.github.com/users/agrieve/repos","events_url":"https://api.github.com/users/agrieve/events{/privacy}","received_events_url":"https://api.github.com/users/agrieve/received_events","type":"User","site_admin":false},"body":"For android-4.0.x, we're trying to do away with referring to android.webkit.WebView explicitly. It'd be better to pass in the CordovaWebView, and to create an abstraction around HttpAuthHandler that just wraps the webkit one.","created_at":"2015-01-13T19:30:21Z","updated_at":"2015-01-13T19:30:21Z","html_url":"https://github.com/apache/cordova-android/pull/143#discussion_r22887338","pull_request_url":"https://api.github.com/repos/apache/cordova-android/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/comments/22887338"},"html":{"href":"https://github.com/apache/cordova-android/pull/143#discussion_r22887338"},"pull_request":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cordova-android/pulls/143","id":26807945,"html_url":"https://github.com/apache/cordova-android/pull/143","diff_url":"https://github.com/apache/cordova-android/pull/143.diff","patch_url":"https://github.com/apache/cordova-android/pull/143.patch","issue_url":"https://api.github.com/repos/apache/cordova-android/issues/143","number":143,"state":"open","locked":false,"title":"CB-8201 Add support for auth dialogs into Cordova Android","user":{"login":"sgrebnov","id":981580,"avatar_url":"https://avatars.githubusercontent.com/u/981580?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrebnov","html_url":"https://github.com/sgrebnov","followers_url":"https://api.github.com/users/sgrebnov/followers","following_url":"https://api.github.com/users/sgrebnov/following{/other_user}","gists_url":"https://api.github.com/users/sgrebnov/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrebnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrebnov/subscriptions","organizations_url":"https://api.github.com/users/sgrebnov/orgs","repos_url":"https://api.github.com/users/sgrebnov/repos","events_url":"https://api.github.com/users/sgrebnov/events{/privacy}","received_events_url":"https://api.github.com/users/sgrebnov/received_events","type":"User","site_admin":false},"body":"https://issues.apache.org/jira/browse/CB-8201\r\n\r\nMakes it possible to provide custom pluggabble logic to process auth challenge (for example by installing corresponding plugin, sample implementation: https://github.com/msopentech/cordova-plugin-auth-dialog).\r\n\r\n*Motivation*\r\nIf you load some resource which requires authentication using android default browser default login dialog appears, but if you try to load the same resource using cordova app then no dialog is shown for user and request is failed w/ 401 Unauthorized. So Currently apps have to provide own JS logic to show web based auth dialog. \r\n\r\nIt will be great if Cordova Android offers special functionality (in core or via special interface plugin developers can extend) to automatically show native auth dialog. This is extremely useful in corpnet scenarios where all resources requires user to be authenticated.","created_at":"2015-01-05T06:16:35Z","updated_at":"2015-01-13T19:30:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee145d00cb5c458a47b97e1339421b506c041454","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cordova-android/pulls/143/commits","review_comments_url":"https://api.github.com/repos/apache/cordova-android/pulls/143/comments","review_comment_url":"https://api.github.com/repos/apache/cordova-android/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/cordova-android/issues/143/comments","statuses_url":"https://api.github.com/repos/apache/cordova-android/statuses/05c805b9bc1b9df09449a4c12fb9b4fd5abcf9cb","head":{"label":"MSOpenTech:CB-8201","ref":"CB-8201","sha":"05c805b9bc1b9df09449a4c12fb9b4fd5abcf9cb","user":{"login":"MSOpenTech","id":1638184,"avatar_url":"https://avatars.githubusercontent.com/u/1638184?v=3","gravatar_id":"","url":"https://api.github.com/users/MSOpenTech","html_url":"https://github.com/MSOpenTech","followers_url":"https://api.github.com/users/MSOpenTech/followers","following_url":"https://api.github.com/users/MSOpenTech/following{/other_user}","gists_url":"https://api.github.com/users/MSOpenTech/gists{/gist_id}","starred_url":"https://api.github.com/users/MSOpenTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSOpenTech/subscriptions","organizations_url":"https://api.github.com/users/MSOpenTech/orgs","repos_url":"https://api.github.com/users/MSOpenTech/repos","events_url":"https://api.github.com/users/MSOpenTech/events{/privacy}","received_events_url":"https://api.github.com/users/MSOpenTech/received_events","type":"Organization","site_admin":false},"repo":{"id":23802310,"name":"cordova-android","full_name":"MSOpenTech/cordova-android","owner":{"login":"MSOpenTech","id":1638184,"avatar_url":"https://avatars.githubusercontent.com/u/1638184?v=3","gravatar_id":"","url":"https://api.github.com/users/MSOpenTech","html_url":"https://github.com/MSOpenTech","followers_url":"https://api.github.com/users/MSOpenTech/followers","following_url":"https://api.github.com/users/MSOpenTech/following{/other_user}","gists_url":"https://api.github.com/users/MSOpenTech/gists{/gist_id}","starred_url":"https://api.github.com/users/MSOpenTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSOpenTech/subscriptions","organizations_url":"https://api.github.com/users/MSOpenTech/orgs","repos_url":"https://api.github.com/users/MSOpenTech/repos","events_url":"https://api.github.com/users/MSOpenTech/events{/privacy}","received_events_url":"https://api.github.com/users/MSOpenTech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MSOpenTech/cordova-android","description":"Mirror of Apache Cordova Android","fork":true,"url":"https://api.github.com/repos/MSOpenTech/cordova-android","forks_url":"https://api.github.com/repos/MSOpenTech/cordova-android/forks","keys_url":"https://api.github.com/repos/MSOpenTech/cordova-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MSOpenTech/cordova-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MSOpenTech/cordova-android/teams","hooks_url":"https://api.github.com/repos/MSOpenTech/cordova-android/hooks","issue_events_url":"https://api.github.com/repos/MSOpenTech/cordova-android/issues/events{/number}","events_url":"https://api.github.com/repos/MSOpenTech/cordova-android/events","assignees_url":"https://api.github.com/repos/MSOpenTech/cordova-android/assignees{/user}","branches_url":"https://api.github.com/repos/MSOpenTech/cordova-android/branches{/branch}","tags_url":"https://api.github.com/repos/MSOpenTech/cordova-android/tags","blobs_url":"https://api.github.com/repos/MSOpenTech/cordova-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MSOpenTech/cordova-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MSOpenTech/cordova-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/MSOpenTech/cordova-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MSOpenTech/cordova-android/statuses/{sha}","languages_url":"https://api.github.com/repos/MSOpenTech/cordova-android/languages","stargazers_url":"https://api.github.com/repos/MSOpenTech/cordova-android/stargazers","contributors_url":"https://api.github.com/repos/MSOpenTech/cordova-android/contributors","subscribers_url":"https://api.github.com/repos/MSOpenTech/cordova-android/subscribers","subscription_url":"https://api.github.com/repos/MSOpenTech/cordova-android/subscription","commits_url":"https://api.github.com/repos/MSOpenTech/cordova-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/MSOpenTech/cordova-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/MSOpenTech/cordova-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/MSOpenTech/cordova-android/issues/comments/{number}","contents_url":"https://api.github.com/repos/MSOpenTech/cordova-android/contents/{+path}","compare_url":"https://api.github.com/repos/MSOpenTech/cordova-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MSOpenTech/cordova-android/merges","archive_url":"https://api.github.com/repos/MSOpenTech/cordova-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MSOpenTech/cordova-android/downloads","issues_url":"https://api.github.com/repos/MSOpenTech/cordova-android/issues{/number}","pulls_url":"https://api.github.com/repos/MSOpenTech/cordova-android/pulls{/number}","milestones_url":"https://api.github.com/repos/MSOpenTech/cordova-android/milestones{/number}","notifications_url":"https://api.github.com/repos/MSOpenTech/cordova-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MSOpenTech/cordova-android/labels{/name}","releases_url":"https://api.github.com/repos/MSOpenTech/cordova-android/releases{/id}","created_at":"2014-09-08T18:12:50Z","updated_at":"2014-12-11T00:07:14Z","pushed_at":"2015-01-13T06:57:32Z","git_url":"git://github.com/MSOpenTech/cordova-android.git","ssh_url":"git@github.com:MSOpenTech/cordova-android.git","clone_url":"https://github.com/MSOpenTech/cordova-android.git","svn_url":"https://github.com/MSOpenTech/cordova-android","homepage":null,"size":24897,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"c2a6dcb6bd98ae8060ef839d403bfd764047bdfa","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":6898381,"name":"cordova-android","full_name":"apache/cordova-android","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cordova-android","description":"Mirror of Apache Cordova Android","fork":false,"url":"https://api.github.com/repos/apache/cordova-android","forks_url":"https://api.github.com/repos/apache/cordova-android/forks","keys_url":"https://api.github.com/repos/apache/cordova-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cordova-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cordova-android/teams","hooks_url":"https://api.github.com/repos/apache/cordova-android/hooks","issue_events_url":"https://api.github.com/repos/apache/cordova-android/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cordova-android/events","assignees_url":"https://api.github.com/repos/apache/cordova-android/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cordova-android/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cordova-android/tags","blobs_url":"https://api.github.com/repos/apache/cordova-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cordova-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cordova-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cordova-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cordova-android/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cordova-android/languages","stargazers_url":"https://api.github.com/repos/apache/cordova-android/stargazers","contributors_url":"https://api.github.com/repos/apache/cordova-android/contributors","subscribers_url":"https://api.github.com/repos/apache/cordova-android/subscribers","subscription_url":"https://api.github.com/repos/apache/cordova-android/subscription","commits_url":"https://api.github.com/repos/apache/cordova-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cordova-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cordova-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cordova-android/issues/comments/{number}","contents_url":"https://api.github.com/repos/apache/cordova-android/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cordova-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cordova-android/merges","archive_url":"https://api.github.com/repos/apache/cordova-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cordova-android/downloads","issues_url":"https://api.github.com/repos/apache/cordova-android/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cordova-android/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cordova-android/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cordova-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cordova-android/labels{/name}","releases_url":"https://api.github.com/repos/apache/cordova-android/releases{/id}","created_at":"2012-11-28T08:00:22Z","updated_at":"2015-01-13T15:01:59Z","pushed_at":"2015-01-13T15:02:18Z","git_url":"git://github.com/apache/cordova-android.git","ssh_url":"git@github.com:apache/cordova-android.git","clone_url":"https://github.com/apache/cordova-android.git","svn_url":"https://github.com/apache/cordova-android","homepage":null,"size":30051,"stargazers_count":819,"watchers_count":819,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":595,"mirror_url":"git://git.apache.org/cordova-android.git","open_issues_count":4,"forks":595,"open_issues":4,"watchers":819,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/143"},"html":{"href":"https://github.com/apache/cordova-android/pull/143"},"issue":{"href":"https://api.github.com/repos/apache/cordova-android/issues/143"},"comments":{"href":"https://api.github.com/repos/apache/cordova-android/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/cordova-android/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cordova-android/statuses/05c805b9bc1b9df09449a4c12fb9b4fd5abcf9cb"}}}}