{"action":"created","comment":{"url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/comments/70799193","id":70799193,"diff_hunk":"@@ -0,0 +1,255 @@\n+package no.difi.idporten.oidc.proxy.proxy;\n+\n+import com.github.tomakehurst.wiremock.WireMockServer;\n+import com.github.tomakehurst.wiremock.core.WireMockConfiguration;\n+import com.google.inject.Guice;\n+import com.google.inject.Injector;\n+import io.netty.handler.codec.http.HttpHeaderNames;\n+import io.netty.handler.codec.http.HttpResponseStatus;\n+import no.difi.idporten.oidc.proxy.config.ConfigModule;\n+import no.difi.idporten.oidc.proxy.idp.GoogleIdentityProvider;\n+import no.difi.idporten.oidc.proxy.storage.StorageModule;\n+import org.apache.commons.io.IOUtils;\n+import org.apache.http.Header;\n+import org.apache.http.HttpResponse;\n+import org.apache.http.HttpStatus;\n+import org.apache.http.client.HttpClient;\n+import org.apache.http.client.methods.HttpGet;\n+import org.apache.http.impl.client.HttpClientBuilder;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.testng.Assert;\n+import org.testng.annotations.*;\n+\n+import java.lang.reflect.Field;\n+import java.util.Arrays;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.stream.Collectors;\n+\n+import static com.github.tomakehurst.wiremock.client.WireMock.*;\n+\n+\n+public class IntegrationTestWithMockServer {\n+    private static Logger logger = LoggerFactory.getLogger(IntegrationTestWithMockServer.class);\n+    private static HttpClient httpClient;\n+    private Thread thread;\n+    private final String BASEURL = \"http://localhost:8080\";\n+    private String specificPathWithGoogle = \"/google/a/specific/path\";\n+    private String unsecuredPath = \"/unsecured\";\n+    private String contentOfASpecificPath = \"content of a specific path\";\n+    private String contentOfAnUnsecuredPath = \"content of an unsecured path\";\n+    private String mockServerHostName = \"www.mockhost.com\";","path":"proxy-proxy/src/test/java/no/difi/idporten/oidc/proxy/proxy/IntegrationTestWithMockServer.java","position":42,"original_position":42,"commit_id":"16d82216980f2404390f36600dd0227e916ba141","original_commit_id":"16d82216980f2404390f36600dd0227e916ba141","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: ['VARIABLE_DEF' should be separated from previous statement.](https://www.codacy.com/app/klakegg/dc16-oidc-proxy/file/2992022224/issues/source?bid=3400779&fileBranchId=3442972#l42)","created_at":"2016-07-14T12:53:33Z","updated_at":"2016-07-14T12:53:33Z","html_url":"https://github.com/difi/dc16-oidc-proxy/pull/84#discussion_r70799193","pull_request_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/comments/70799193"},"html":{"href":"https://github.com/difi/dc16-oidc-proxy/pull/84#discussion_r70799193"},"pull_request":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84","id":77450772,"html_url":"https://github.com/difi/dc16-oidc-proxy/pull/84","diff_url":"https://github.com/difi/dc16-oidc-proxy/pull/84.diff","patch_url":"https://github.com/difi/dc16-oidc-proxy/pull/84.patch","issue_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/84","number":84,"state":"open","locked":false,"title":"Integration test with mock server","user":{"login":"viktorfa","id":5357936,"avatar_url":"https://avatars.githubusercontent.com/u/5357936?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorfa","html_url":"https://github.com/viktorfa","followers_url":"https://api.github.com/users/viktorfa/followers","following_url":"https://api.github.com/users/viktorfa/following{/other_user}","gists_url":"https://api.github.com/users/viktorfa/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorfa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorfa/subscriptions","organizations_url":"https://api.github.com/users/viktorfa/orgs","repos_url":"https://api.github.com/users/viktorfa/repos","events_url":"https://api.github.com/users/viktorfa/events{/privacy}","received_events_url":"https://api.github.com/users/viktorfa/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-14T12:52:11Z","updated_at":"2016-07-14T12:53:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e096673c36b3b782e978d88a25846b7287b5cfb3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84/commits","review_comments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84/comments","review_comment_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/84/comments","statuses_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/statuses/16d82216980f2404390f36600dd0227e916ba141","head":{"label":"difi:integration-test-with-mock-server","ref":"integration-test-with-mock-server","sha":"16d82216980f2404390f36600dd0227e916ba141","user":{"login":"difi","id":226592,"avatar_url":"https://avatars.githubusercontent.com/u/226592?v=3","gravatar_id":"","url":"https://api.github.com/users/difi","html_url":"https://github.com/difi","followers_url":"https://api.github.com/users/difi/followers","following_url":"https://api.github.com/users/difi/following{/other_user}","gists_url":"https://api.github.com/users/difi/gists{/gist_id}","starred_url":"https://api.github.com/users/difi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/difi/subscriptions","organizations_url":"https://api.github.com/users/difi/orgs","repos_url":"https://api.github.com/users/difi/repos","events_url":"https://api.github.com/users/difi/events{/privacy}","received_events_url":"https://api.github.com/users/difi/received_events","type":"Organization","site_admin":false},"repo":{"id":60424566,"name":"dc16-oidc-proxy","full_name":"difi/dc16-oidc-proxy","owner":{"login":"difi","id":226592,"avatar_url":"https://avatars.githubusercontent.com/u/226592?v=3","gravatar_id":"","url":"https://api.github.com/users/difi","html_url":"https://github.com/difi","followers_url":"https://api.github.com/users/difi/followers","following_url":"https://api.github.com/users/difi/following{/other_user}","gists_url":"https://api.github.com/users/difi/gists{/gist_id}","starred_url":"https://api.github.com/users/difi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/difi/subscriptions","organizations_url":"https://api.github.com/users/difi/orgs","repos_url":"https://api.github.com/users/difi/repos","events_url":"https://api.github.com/users/difi/events{/privacy}","received_events_url":"https://api.github.com/users/difi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/difi/dc16-oidc-proxy","description":"DifiCamp 2016 Open ID Connect Proxy project","fork":false,"url":"https://api.github.com/repos/difi/dc16-oidc-proxy","forks_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/forks","keys_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/teams","hooks_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/hooks","issue_events_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/events","assignees_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/tags","blobs_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/languages","stargazers_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/stargazers","contributors_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/contributors","subscribers_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/subscribers","subscription_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/subscription","commits_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/merges","archive_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/downloads","issues_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/labels{/name}","releases_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/releases{/id}","deployments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/deployments","created_at":"2016-06-04T18:30:42Z","updated_at":"2016-06-16T05:47:46Z","pushed_at":"2016-07-14T12:52:23Z","git_url":"git://github.com/difi/dc16-oidc-proxy.git","ssh_url":"git@github.com:difi/dc16-oidc-proxy.git","clone_url":"https://github.com/difi/dc16-oidc-proxy.git","svn_url":"https://github.com/difi/dc16-oidc-proxy","homepage":null,"size":532,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"difi:master","ref":"master","sha":"d201a48222ced53cbdca1f3180808c65024747b8","user":{"login":"difi","id":226592,"avatar_url":"https://avatars.githubusercontent.com/u/226592?v=3","gravatar_id":"","url":"https://api.github.com/users/difi","html_url":"https://github.com/difi","followers_url":"https://api.github.com/users/difi/followers","following_url":"https://api.github.com/users/difi/following{/other_user}","gists_url":"https://api.github.com/users/difi/gists{/gist_id}","starred_url":"https://api.github.com/users/difi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/difi/subscriptions","organizations_url":"https://api.github.com/users/difi/orgs","repos_url":"https://api.github.com/users/difi/repos","events_url":"https://api.github.com/users/difi/events{/privacy}","received_events_url":"https://api.github.com/users/difi/received_events","type":"Organization","site_admin":false},"repo":{"id":60424566,"name":"dc16-oidc-proxy","full_name":"difi/dc16-oidc-proxy","owner":{"login":"difi","id":226592,"avatar_url":"https://avatars.githubusercontent.com/u/226592?v=3","gravatar_id":"","url":"https://api.github.com/users/difi","html_url":"https://github.com/difi","followers_url":"https://api.github.com/users/difi/followers","following_url":"https://api.github.com/users/difi/following{/other_user}","gists_url":"https://api.github.com/users/difi/gists{/gist_id}","starred_url":"https://api.github.com/users/difi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/difi/subscriptions","organizations_url":"https://api.github.com/users/difi/orgs","repos_url":"https://api.github.com/users/difi/repos","events_url":"https://api.github.com/users/difi/events{/privacy}","received_events_url":"https://api.github.com/users/difi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/difi/dc16-oidc-proxy","description":"DifiCamp 2016 Open ID Connect Proxy project","fork":false,"url":"https://api.github.com/repos/difi/dc16-oidc-proxy","forks_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/forks","keys_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/teams","hooks_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/hooks","issue_events_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/events","assignees_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/tags","blobs_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/languages","stargazers_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/stargazers","contributors_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/contributors","subscribers_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/subscribers","subscription_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/subscription","commits_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/merges","archive_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/downloads","issues_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/labels{/name}","releases_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/releases{/id}","deployments_url":"https://api.github.com/repos/difi/dc16-oidc-proxy/deployments","created_at":"2016-06-04T18:30:42Z","updated_at":"2016-06-16T05:47:46Z","pushed_at":"2016-07-14T12:52:23Z","git_url":"git://github.com/difi/dc16-oidc-proxy.git","ssh_url":"git@github.com:difi/dc16-oidc-proxy.git","clone_url":"https://github.com/difi/dc16-oidc-proxy.git","svn_url":"https://github.com/difi/dc16-oidc-proxy","homepage":null,"size":532,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84"},"html":{"href":"https://github.com/difi/dc16-oidc-proxy/pull/84"},"issue":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/84"},"comments":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/difi/dc16-oidc-proxy/statuses/16d82216980f2404390f36600dd0227e916ba141"}}}}
{"actor":{"display_login":"codacy-bot"}}