{"action":"created","comment":{"url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/comments/232582701","pull_request_review_id":173806821,"id":232582701,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjU4MjcwMQ==","diff_hunk":"@@ -187,11 +196,115 @@ def init_app(self, app):\n         except KeyError:\n             pass\n \n-    def load_secrets(self, app):\n-        # Load client_secrets.json to pre-initialize some configuration\n-        return _json_loads(open(app.config['OIDC_CLIENT_SECRETS'],\n-                                   'r').read())\n-        \n+    def init_provider(self, provider):\n+        \"\"\"\n+        Do setup for a specific provider\n+\n+        :param provider: The provider to initialize.\n+        :type provider: Dictionary with at lease 'base_url' item","path":"flask_oidc/__init__.py","position":100,"original_position":100,"commit_id":"99e5554d09992dc98ea7a6dad0878df8388aaaca","original_commit_id":"99e5554d09992dc98ea7a6dad0878df8388aaaca","user":{"login":"puiterwijk","id":967561,"node_id":"MDQ6VXNlcjk2NzU2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/967561?v=4","gravatar_id":"","url":"https://api.github.com/users/puiterwijk","html_url":"https://github.com/puiterwijk","followers_url":"https://api.github.com/users/puiterwijk/followers","following_url":"https://api.github.com/users/puiterwijk/following{/other_user}","gists_url":"https://api.github.com/users/puiterwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/puiterwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puiterwijk/subscriptions","organizations_url":"https://api.github.com/users/puiterwijk/orgs","repos_url":"https://api.github.com/users/puiterwijk/repos","events_url":"https://api.github.com/users/puiterwijk/events{/privacy}","received_events_url":"https://api.github.com/users/puiterwijk/received_events","type":"User","site_admin":false},"body":"s/lease/least/","created_at":"2018-11-12T09:24:32Z","updated_at":"2018-11-12T09:31:57Z","html_url":"https://github.com/puiterwijk/flask-oidc/pull/70#discussion_r232582701","pull_request_url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/comments/232582701"},"html":{"href":"https://github.com/puiterwijk/flask-oidc/pull/70#discussion_r232582701"},"pull_request":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70","id":228996821,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTk2ODIx","html_url":"https://github.com/puiterwijk/flask-oidc/pull/70","diff_url":"https://github.com/puiterwijk/flask-oidc/pull/70.diff","patch_url":"https://github.com/puiterwijk/flask-oidc/pull/70.patch","issue_url":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/70","number":70,"state":"open","locked":false,"title":"Dynamic Provider","user":{"login":"HarryKodden","id":1842889,"node_id":"MDQ6VXNlcjE4NDI4ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/1842889?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryKodden","html_url":"https://github.com/HarryKodden","followers_url":"https://api.github.com/users/HarryKodden/followers","following_url":"https://api.github.com/users/HarryKodden/following{/other_user}","gists_url":"https://api.github.com/users/HarryKodden/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryKodden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryKodden/subscriptions","organizations_url":"https://api.github.com/users/HarryKodden/orgs","repos_url":"https://api.github.com/users/HarryKodden/repos","events_url":"https://api.github.com/users/HarryKodden/events{/privacy}","received_events_url":"https://api.github.com/users/HarryKodden/received_events","type":"User","site_admin":false},"body":"Add ability to connect to an OIDC OP at Runtime. For backwards compatibility the existing config option OIDC_CLIENT_SECRETS is still supported. \r\n\r\nUsage for dynamic OP connectivity is:\r\n\r\nInitialize the Flask App as normal:\r\n```\r\napp = Flask(__name__)\r\noidc =  OpenIDConnect(app)\r\n```\r\n\r\nSpecify the Provider to connect with:\r\n```\r\nmy_provider = { \r\n   'base_url': 'https://example.org' , \r\n   'registration': { 'client_id': 'xxx', 'client_secret': 'yyy' }\r\n} \r\n```\r\n\r\nNow finalize the configuration for this OIDC Provider (meaning the discovery will take place)\r\n```\r\noidc.init_provider(my_provider)\r\n```\r\n\r\nAnd use the authentication as normal:\r\n```\r\n@app.route('/private')\r\n@oidc.require_login\r\ndef private():\r\n   ...\r\n```","created_at":"2018-11-07T11:26:07Z","updated_at":"2018-11-12T09:31:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87121c5ddc8886854203d20d45f0148a0b6ec7d3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70/commits","review_comments_url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70/comments","review_comment_url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/70/comments","statuses_url":"https://api.github.com/repos/puiterwijk/flask-oidc/statuses/99e5554d09992dc98ea7a6dad0878df8388aaaca","head":{"label":"HarryKodden:dynamic_op","ref":"dynamic_op","sha":"99e5554d09992dc98ea7a6dad0878df8388aaaca","user":{"login":"HarryKodden","id":1842889,"node_id":"MDQ6VXNlcjE4NDI4ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/1842889?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryKodden","html_url":"https://github.com/HarryKodden","followers_url":"https://api.github.com/users/HarryKodden/followers","following_url":"https://api.github.com/users/HarryKodden/following{/other_user}","gists_url":"https://api.github.com/users/HarryKodden/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryKodden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryKodden/subscriptions","organizations_url":"https://api.github.com/users/HarryKodden/orgs","repos_url":"https://api.github.com/users/HarryKodden/repos","events_url":"https://api.github.com/users/HarryKodden/events{/privacy}","received_events_url":"https://api.github.com/users/HarryKodden/received_events","type":"User","site_admin":false},"repo":{"id":154309573,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQzMDk1NzM=","name":"flask-oidc","full_name":"HarryKodden/flask-oidc","private":false,"owner":{"login":"HarryKodden","id":1842889,"node_id":"MDQ6VXNlcjE4NDI4ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/1842889?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryKodden","html_url":"https://github.com/HarryKodden","followers_url":"https://api.github.com/users/HarryKodden/followers","following_url":"https://api.github.com/users/HarryKodden/following{/other_user}","gists_url":"https://api.github.com/users/HarryKodden/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryKodden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryKodden/subscriptions","organizations_url":"https://api.github.com/users/HarryKodden/orgs","repos_url":"https://api.github.com/users/HarryKodden/repos","events_url":"https://api.github.com/users/HarryKodden/events{/privacy}","received_events_url":"https://api.github.com/users/HarryKodden/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HarryKodden/flask-oidc","description":"OpenID Connect support for Flask","fork":true,"url":"https://api.github.com/repos/HarryKodden/flask-oidc","forks_url":"https://api.github.com/repos/HarryKodden/flask-oidc/forks","keys_url":"https://api.github.com/repos/HarryKodden/flask-oidc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HarryKodden/flask-oidc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HarryKodden/flask-oidc/teams","hooks_url":"https://api.github.com/repos/HarryKodden/flask-oidc/hooks","issue_events_url":"https://api.github.com/repos/HarryKodden/flask-oidc/issues/events{/number}","events_url":"https://api.github.com/repos/HarryKodden/flask-oidc/events","assignees_url":"https://api.github.com/repos/HarryKodden/flask-oidc/assignees{/user}","branches_url":"https://api.github.com/repos/HarryKodden/flask-oidc/branches{/branch}","tags_url":"https://api.github.com/repos/HarryKodden/flask-oidc/tags","blobs_url":"https://api.github.com/repos/HarryKodden/flask-oidc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HarryKodden/flask-oidc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HarryKodden/flask-oidc/git/refs{/sha}","trees_url":"https://api.github.com/repos/HarryKodden/flask-oidc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HarryKodden/flask-oidc/statuses/{sha}","languages_url":"https://api.github.com/repos/HarryKodden/flask-oidc/languages","stargazers_url":"https://api.github.com/repos/HarryKodden/flask-oidc/stargazers","contributors_url":"https://api.github.com/repos/HarryKodden/flask-oidc/contributors","subscribers_url":"https://api.github.com/repos/HarryKodden/flask-oidc/subscribers","subscription_url":"https://api.github.com/repos/HarryKodden/flask-oidc/subscription","commits_url":"https://api.github.com/repos/HarryKodden/flask-oidc/commits{/sha}","git_commits_url":"https://api.github.com/repos/HarryKodden/flask-oidc/git/commits{/sha}","comments_url":"https://api.github.com/repos/HarryKodden/flask-oidc/comments{/number}","issue_comment_url":"https://api.github.com/repos/HarryKodden/flask-oidc/issues/comments{/number}","contents_url":"https://api.github.com/repos/HarryKodden/flask-oidc/contents/{+path}","compare_url":"https://api.github.com/repos/HarryKodden/flask-oidc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HarryKodden/flask-oidc/merges","archive_url":"https://api.github.com/repos/HarryKodden/flask-oidc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HarryKodden/flask-oidc/downloads","issues_url":"https://api.github.com/repos/HarryKodden/flask-oidc/issues{/number}","pulls_url":"https://api.github.com/repos/HarryKodden/flask-oidc/pulls{/number}","milestones_url":"https://api.github.com/repos/HarryKodden/flask-oidc/milestones{/number}","notifications_url":"https://api.github.com/repos/HarryKodden/flask-oidc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HarryKodden/flask-oidc/labels{/name}","releases_url":"https://api.github.com/repos/HarryKodden/flask-oidc/releases{/id}","deployments_url":"https://api.github.com/repos/HarryKodden/flask-oidc/deployments","created_at":"2018-10-23T10:34:37Z","updated_at":"2018-11-07T08:58:40Z","pushed_at":"2018-11-08T10:39:10Z","git_url":"git://github.com/HarryKodden/flask-oidc.git","ssh_url":"git@github.com:HarryKodden/flask-oidc.git","clone_url":"https://github.com/HarryKodden/flask-oidc.git","svn_url":"https://github.com/HarryKodden/flask-oidc","homepage":"","size":138,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puiterwijk:master","ref":"master","sha":"68767920a5419e45ba5e725bf758587f01a2a265","user":{"login":"puiterwijk","id":967561,"node_id":"MDQ6VXNlcjk2NzU2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/967561?v=4","gravatar_id":"","url":"https://api.github.com/users/puiterwijk","html_url":"https://github.com/puiterwijk","followers_url":"https://api.github.com/users/puiterwijk/followers","following_url":"https://api.github.com/users/puiterwijk/following{/other_user}","gists_url":"https://api.github.com/users/puiterwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/puiterwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puiterwijk/subscriptions","organizations_url":"https://api.github.com/users/puiterwijk/orgs","repos_url":"https://api.github.com/users/puiterwijk/repos","events_url":"https://api.github.com/users/puiterwijk/events{/privacy}","received_events_url":"https://api.github.com/users/puiterwijk/received_events","type":"User","site_admin":false},"repo":{"id":21362433,"node_id":"MDEwOlJlcG9zaXRvcnkyMTM2MjQzMw==","name":"flask-oidc","full_name":"puiterwijk/flask-oidc","private":false,"owner":{"login":"puiterwijk","id":967561,"node_id":"MDQ6VXNlcjk2NzU2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/967561?v=4","gravatar_id":"","url":"https://api.github.com/users/puiterwijk","html_url":"https://github.com/puiterwijk","followers_url":"https://api.github.com/users/puiterwijk/followers","following_url":"https://api.github.com/users/puiterwijk/following{/other_user}","gists_url":"https://api.github.com/users/puiterwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/puiterwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puiterwijk/subscriptions","organizations_url":"https://api.github.com/users/puiterwijk/orgs","repos_url":"https://api.github.com/users/puiterwijk/repos","events_url":"https://api.github.com/users/puiterwijk/events{/privacy}","received_events_url":"https://api.github.com/users/puiterwijk/received_events","type":"User","site_admin":false},"html_url":"https://github.com/puiterwijk/flask-oidc","description":"OpenID Connect support for Flask","fork":false,"url":"https://api.github.com/repos/puiterwijk/flask-oidc","forks_url":"https://api.github.com/repos/puiterwijk/flask-oidc/forks","keys_url":"https://api.github.com/repos/puiterwijk/flask-oidc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puiterwijk/flask-oidc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puiterwijk/flask-oidc/teams","hooks_url":"https://api.github.com/repos/puiterwijk/flask-oidc/hooks","issue_events_url":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/events{/number}","events_url":"https://api.github.com/repos/puiterwijk/flask-oidc/events","assignees_url":"https://api.github.com/repos/puiterwijk/flask-oidc/assignees{/user}","branches_url":"https://api.github.com/repos/puiterwijk/flask-oidc/branches{/branch}","tags_url":"https://api.github.com/repos/puiterwijk/flask-oidc/tags","blobs_url":"https://api.github.com/repos/puiterwijk/flask-oidc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puiterwijk/flask-oidc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puiterwijk/flask-oidc/git/refs{/sha}","trees_url":"https://api.github.com/repos/puiterwijk/flask-oidc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puiterwijk/flask-oidc/statuses/{sha}","languages_url":"https://api.github.com/repos/puiterwijk/flask-oidc/languages","stargazers_url":"https://api.github.com/repos/puiterwijk/flask-oidc/stargazers","contributors_url":"https://api.github.com/repos/puiterwijk/flask-oidc/contributors","subscribers_url":"https://api.github.com/repos/puiterwijk/flask-oidc/subscribers","subscription_url":"https://api.github.com/repos/puiterwijk/flask-oidc/subscription","commits_url":"https://api.github.com/repos/puiterwijk/flask-oidc/commits{/sha}","git_commits_url":"https://api.github.com/repos/puiterwijk/flask-oidc/git/commits{/sha}","comments_url":"https://api.github.com/repos/puiterwijk/flask-oidc/comments{/number}","issue_comment_url":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/comments{/number}","contents_url":"https://api.github.com/repos/puiterwijk/flask-oidc/contents/{+path}","compare_url":"https://api.github.com/repos/puiterwijk/flask-oidc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puiterwijk/flask-oidc/merges","archive_url":"https://api.github.com/repos/puiterwijk/flask-oidc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puiterwijk/flask-oidc/downloads","issues_url":"https://api.github.com/repos/puiterwijk/flask-oidc/issues{/number}","pulls_url":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls{/number}","milestones_url":"https://api.github.com/repos/puiterwijk/flask-oidc/milestones{/number}","notifications_url":"https://api.github.com/repos/puiterwijk/flask-oidc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puiterwijk/flask-oidc/labels{/name}","releases_url":"https://api.github.com/repos/puiterwijk/flask-oidc/releases{/id}","deployments_url":"https://api.github.com/repos/puiterwijk/flask-oidc/deployments","created_at":"2014-06-30T19:02:00Z","updated_at":"2018-11-02T09:46:52Z","pushed_at":"2018-11-08T10:39:11Z","git_url":"git://github.com/puiterwijk/flask-oidc.git","ssh_url":"git@github.com:puiterwijk/flask-oidc.git","clone_url":"https://github.com/puiterwijk/flask-oidc.git","svn_url":"https://github.com/puiterwijk/flask-oidc","homepage":"","size":130,"stargazers_count":55,"watchers_count":55,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":54,"open_issues":30,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70"},"html":{"href":"https://github.com/puiterwijk/flask-oidc/pull/70"},"issue":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/70"},"comments":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/puiterwijk/flask-oidc/statuses/99e5554d09992dc98ea7a6dad0878df8388aaaca"}},"author_association":"NONE"}}
{"actor":{"display_login":"puiterwijk"}}