{"action":"created","comment":{"url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/comments/115958946","pull_request_review_id":37541568,"id":115958946,"diff_hunk":"@@ -0,0 +1,96 @@\n+package com.telenor.connect;\n+\n+import android.content.Context;\n+\n+import com.telenor.connect.id.ConnectIdService;\n+import com.telenor.connect.utils.RestHelper;\n+\n+import java.util.concurrent.ExecutorService;\n+import java.util.concurrent.Executors;\n+\n+import retrofit.Callback;\n+import retrofit.RetrofitError;\n+import retrofit.client.Response;\n+\n+public abstract class AbstractSdkProfile implements SdkProfile {\n+\n+    private volatile ConnectIdService connectIdService;\n+    private volatile WellKnownAPI.WellKnownConfig wellKnownConfig;\n+\n+    protected Context context;\n+    protected boolean useStaging;\n+    protected boolean confidentialClient;\n+    private volatile boolean isInitialized = false;\n+\n+    public AbstractSdkProfile(\n+            Context context,\n+            boolean useStaging,\n+            boolean confidentialClient) {\n+        this.context = context;\n+        this.useStaging = useStaging;\n+        this.confidentialClient = confidentialClient;\n+    }\n+\n+    protected abstract String getWellKnownEndpoint();\n+\n+    @Override\n+    public Context getContext() {\n+        return context;\n+    }\n+\n+    public WellKnownAPI.WellKnownConfig getWellKnownConfig() {\n+        return wellKnownConfig;\n+    }\n+\n+    @Override\n+    public boolean isConfidentialClient() {\n+        return confidentialClient;\n+    }\n+\n+    @Override\n+    public ConnectIdService getConnectIdService() {\n+        return connectIdService;\n+    }\n+\n+    public void setConnectIdService(ConnectIdService connectIdService) {\n+        this.connectIdService = connectIdService;\n+    }\n+\n+    protected boolean isInitialized() {\n+        return isInitialized;\n+    }\n+\n+    protected void  setInitialized(boolean isInitialized) {\n+        this.isInitialized = isInitialized;\n+    }\n+\n+    protected void deInitialize() {\n+        isInitialized = false;\n+        wellKnownConfig = null;\n+    }\n+\n+    protected boolean initialize() {\n+        if (!isInitialized) {\n+            fetchWellKnownConfig();\n+            isInitialized = true;\n+        }","path":"connect/src/com/telenor/connect/AbstractSdkProfile.java","position":null,"original_position":76,"commit_id":"d1bfca6c2598aa600a2104700026548eb64a68c8","original_commit_id":"3cb721d6a17dc019634587249988156fb7261357","user":{"login":"gorandostanic","id":27007202,"avatar_url":"https://avatars3.githubusercontent.com/u/27007202?v=3","gravatar_id":"","url":"https://api.github.com/users/gorandostanic","html_url":"https://github.com/gorandostanic","followers_url":"https://api.github.com/users/gorandostanic/followers","following_url":"https://api.github.com/users/gorandostanic/following{/other_user}","gists_url":"https://api.github.com/users/gorandostanic/gists{/gist_id}","starred_url":"https://api.github.com/users/gorandostanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorandostanic/subscriptions","organizations_url":"https://api.github.com/users/gorandostanic/orgs","repos_url":"https://api.github.com/users/gorandostanic/repos","events_url":"https://api.github.com/users/gorandostanic/events{/privacy}","received_events_url":"https://api.github.com/users/gorandostanic/received_events","type":"User","site_admin":false},"body":"This is executed only when SdkProfile.authenticate() is called, which is synchronised.","created_at":"2017-05-11T10:46:39Z","updated_at":"2017-05-11T10:46:39Z","html_url":"https://github.com/telenordigital/connect-android-sdk/pull/50#discussion_r115958946","pull_request_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/comments/115958946"},"html":{"href":"https://github.com/telenordigital/connect-android-sdk/pull/50#discussion_r115958946"},"pull_request":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50","id":118495045,"html_url":"https://github.com/telenordigital/connect-android-sdk/pull/50","diff_url":"https://github.com/telenordigital/connect-android-sdk/pull/50.diff","patch_url":"https://github.com/telenordigital/connect-android-sdk/pull/50.patch","issue_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/50","number":50,"state":"open","locked":false,"title":"Mc 1568 od","user":{"login":"gorandostanic","id":27007202,"avatar_url":"https://avatars3.githubusercontent.com/u/27007202?v=3","gravatar_id":"","url":"https://api.github.com/users/gorandostanic","html_url":"https://github.com/gorandostanic","followers_url":"https://api.github.com/users/gorandostanic/followers","following_url":"https://api.github.com/users/gorandostanic/following{/other_user}","gists_url":"https://api.github.com/users/gorandostanic/gists{/gist_id}","starred_url":"https://api.github.com/users/gorandostanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorandostanic/subscriptions","organizations_url":"https://api.github.com/users/gorandostanic/orgs","repos_url":"https://api.github.com/users/gorandostanic/repos","events_url":"https://api.github.com/users/gorandostanic/events{/privacy}","received_events_url":"https://api.github.com/users/gorandostanic/received_events","type":"User","site_admin":false},"body":"Add operator discovery functionality to Connect ID Android SDK allowing it to be used as MobileConnect SDK.\r\n\r\nMore info: https://confluence.skunk-works.no/jira/browse/MC-1568","created_at":"2017-05-02T06:50:13Z","updated_at":"2017-05-11T10:46:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2639f806d9f5022d2e85896bb3e32ab656dd16fb","assignee":null,"assignees":[],"requested_reviewers":[{"login":"DidierParat","id":25526011,"avatar_url":"https://avatars2.githubusercontent.com/u/25526011?v=3","gravatar_id":"","url":"https://api.github.com/users/DidierParat","html_url":"https://github.com/DidierParat","followers_url":"https://api.github.com/users/DidierParat/followers","following_url":"https://api.github.com/users/DidierParat/following{/other_user}","gists_url":"https://api.github.com/users/DidierParat/gists{/gist_id}","starred_url":"https://api.github.com/users/DidierParat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DidierParat/subscriptions","organizations_url":"https://api.github.com/users/DidierParat/orgs","repos_url":"https://api.github.com/users/DidierParat/repos","events_url":"https://api.github.com/users/DidierParat/events{/privacy}","received_events_url":"https://api.github.com/users/DidierParat/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50/commits","review_comments_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50/comments","review_comment_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/50/comments","statuses_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/statuses/d1bfca6c2598aa600a2104700026548eb64a68c8","head":{"label":"gorandostanic:MC-1568-OD","ref":"MC-1568-OD","sha":"d1bfca6c2598aa600a2104700026548eb64a68c8","user":{"login":"gorandostanic","id":27007202,"avatar_url":"https://avatars3.githubusercontent.com/u/27007202?v=3","gravatar_id":"","url":"https://api.github.com/users/gorandostanic","html_url":"https://github.com/gorandostanic","followers_url":"https://api.github.com/users/gorandostanic/followers","following_url":"https://api.github.com/users/gorandostanic/following{/other_user}","gists_url":"https://api.github.com/users/gorandostanic/gists{/gist_id}","starred_url":"https://api.github.com/users/gorandostanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorandostanic/subscriptions","organizations_url":"https://api.github.com/users/gorandostanic/orgs","repos_url":"https://api.github.com/users/gorandostanic/repos","events_url":"https://api.github.com/users/gorandostanic/events{/privacy}","received_events_url":"https://api.github.com/users/gorandostanic/received_events","type":"User","site_admin":false},"repo":{"id":88724629,"name":"connect-android-sdk","full_name":"gorandostanic/connect-android-sdk","owner":{"login":"gorandostanic","id":27007202,"avatar_url":"https://avatars3.githubusercontent.com/u/27007202?v=3","gravatar_id":"","url":"https://api.github.com/users/gorandostanic","html_url":"https://github.com/gorandostanic","followers_url":"https://api.github.com/users/gorandostanic/followers","following_url":"https://api.github.com/users/gorandostanic/following{/other_user}","gists_url":"https://api.github.com/users/gorandostanic/gists{/gist_id}","starred_url":"https://api.github.com/users/gorandostanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorandostanic/subscriptions","organizations_url":"https://api.github.com/users/gorandostanic/orgs","repos_url":"https://api.github.com/users/gorandostanic/repos","events_url":"https://api.github.com/users/gorandostanic/events{/privacy}","received_events_url":"https://api.github.com/users/gorandostanic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gorandostanic/connect-android-sdk","description":"Android SDK for Telenor Connect","fork":true,"url":"https://api.github.com/repos/gorandostanic/connect-android-sdk","forks_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/forks","keys_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/teams","hooks_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/hooks","issue_events_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/events","assignees_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/tags","blobs_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/languages","stargazers_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/stargazers","contributors_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/contributors","subscribers_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/subscribers","subscription_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/subscription","commits_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/merges","archive_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/downloads","issues_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/labels{/name}","releases_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/gorandostanic/connect-android-sdk/deployments","created_at":"2017-04-19T09:09:01Z","updated_at":"2017-04-19T09:09:02Z","pushed_at":"2017-05-11T10:18:18Z","git_url":"git://github.com/gorandostanic/connect-android-sdk.git","ssh_url":"git@github.com:gorandostanic/connect-android-sdk.git","clone_url":"https://github.com/gorandostanic/connect-android-sdk.git","svn_url":"https://github.com/gorandostanic/connect-android-sdk","homepage":"http://docs.telenordigital.com/connect/","size":617,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"telenordigital:master","ref":"master","sha":"4feef469b9e2c167f8b277cbc0ac880a9fef6601","user":{"login":"telenordigital","id":14310842,"avatar_url":"https://avatars3.githubusercontent.com/u/14310842?v=3","gravatar_id":"","url":"https://api.github.com/users/telenordigital","html_url":"https://github.com/telenordigital","followers_url":"https://api.github.com/users/telenordigital/followers","following_url":"https://api.github.com/users/telenordigital/following{/other_user}","gists_url":"https://api.github.com/users/telenordigital/gists{/gist_id}","starred_url":"https://api.github.com/users/telenordigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telenordigital/subscriptions","organizations_url":"https://api.github.com/users/telenordigital/orgs","repos_url":"https://api.github.com/users/telenordigital/repos","events_url":"https://api.github.com/users/telenordigital/events{/privacy}","received_events_url":"https://api.github.com/users/telenordigital/received_events","type":"Organization","site_admin":false},"repo":{"id":52869089,"name":"connect-android-sdk","full_name":"telenordigital/connect-android-sdk","owner":{"login":"telenordigital","id":14310842,"avatar_url":"https://avatars3.githubusercontent.com/u/14310842?v=3","gravatar_id":"","url":"https://api.github.com/users/telenordigital","html_url":"https://github.com/telenordigital","followers_url":"https://api.github.com/users/telenordigital/followers","following_url":"https://api.github.com/users/telenordigital/following{/other_user}","gists_url":"https://api.github.com/users/telenordigital/gists{/gist_id}","starred_url":"https://api.github.com/users/telenordigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telenordigital/subscriptions","organizations_url":"https://api.github.com/users/telenordigital/orgs","repos_url":"https://api.github.com/users/telenordigital/repos","events_url":"https://api.github.com/users/telenordigital/events{/privacy}","received_events_url":"https://api.github.com/users/telenordigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telenordigital/connect-android-sdk","description":"Android SDK for Telenor Connect","fork":false,"url":"https://api.github.com/repos/telenordigital/connect-android-sdk","forks_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/forks","keys_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/teams","hooks_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/hooks","issue_events_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/events","assignees_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/tags","blobs_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/languages","stargazers_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/stargazers","contributors_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/contributors","subscribers_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/subscribers","subscription_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/subscription","commits_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/merges","archive_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/downloads","issues_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/labels{/name}","releases_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/telenordigital/connect-android-sdk/deployments","created_at":"2016-03-01T10:37:38Z","updated_at":"2017-01-27T10:48:49Z","pushed_at":"2017-05-11T10:18:20Z","git_url":"git://github.com/telenordigital/connect-android-sdk.git","ssh_url":"git@github.com:telenordigital/connect-android-sdk.git","clone_url":"https://github.com/telenordigital/connect-android-sdk.git","svn_url":"https://github.com/telenordigital/connect-android-sdk","homepage":"http://docs.telenordigital.com/connect/","size":510,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50"},"html":{"href":"https://github.com/telenordigital/connect-android-sdk/pull/50"},"issue":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/50"},"comments":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/telenordigital/connect-android-sdk/statuses/d1bfca6c2598aa600a2104700026548eb64a68c8"}}}}
{"actor":{"display_login":"gorandostanic"}}